Flex Code Behind Issue

Hey guys,
so I have created a simple flex proj
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute" themeColor="#0EFF02">
<mx:Script>
<![CDATA[
private function onOver(evt:Event):void{
trace("onOver : " +evt.currentTarget );
test.setStyle("backgroundColor",0xff00ff);
private function onOut(evt:Event):void{
trace("onOut : " +evt.currentTarget );
test.setStyle("backgroundColor",0xffff00);
]]>
</mx:Script>
<mx:Canvas id="test" x="118" y="136" width="443"
height="133" themeColor="#099FFF" backgroundColor="#D70000"
rollOver="onOver(event);" rollOut="onOut(event);">
<mx:Button x="39" y="35" label="Button"/>
</mx:Canvas>
</mx:Application>
So basically all the code above does is changes the
backgroundColor of the Canvas. It works fine
Now if I make a MXML Component using the Code Behind Method
Main.mxml
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute" themeColor="#0EFF02" xmlns:ns1="item.*">
<ns1:ListItem x="80" y="48"/>
</mx:Application>
ListItem.mxml
<item:CListItem xmlns:mx="
http://www.adobe.com/2006/mxml"
width="400" height="300" xmlns:item="item.*">
<mx:Button x="65" y="61" label="Button"/>
</item:CListItem>
CListItem.as
package item
import flash.events.MouseEvent;
import mx.containers.Canvas;
import mx.events.FlexEvent;
public class CListItem extends Canvas
public function CListItem()
super();
this.addEventListener(FlexEvent.CREATION_COMPLETE,
onComponentLoaded);
private function onMouseOver(evt:MouseEvent):void{
trace("CListItem.onMouseOver :");
this.setStyle("backgroundColor",0xff00ff);
private function onMouseOut(evt:MouseEvent):void{
trace("CListItem.onMouseOut");
this.setStyle("backgroundColor",0xffff00);
private function onComponentLoaded(evt:FlexEvent):void{
this.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
this.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
Now when I mouse over the Button component the onMouseOut
function gets called and there is a flicker in the backgroundColor.
If I dont use the Code Behind Method then the onMouseOut
function does not get called when I rollOver the button.
Can anyone explain this strange behavior?
Thanks
Cheers
Firdosh

Conrad - there's no plans to enhance specific codebehind support.  It's worth mentioning, however, that you can adopt the spark skinning model for all of your components to get a good codebehind separation of view and logic.
Ely.

Similar Messages

  • AdvancedDataGrid ItemRenderer Issue using code behind method

    I have been trying to get an itemrenderer to correctly work in an advanveddatagrid. I've used several itemrenderers in the past so this is pretty basic. I haven't however tried to attach to a grid that is inside a page using the code behind method. My issue is that the grid breaks if I try to put more than one visual component on the renderer. See the images below:
    Here is an example with a plain canvas itemrenderer:
    As you can see the scroll bar appears and everything looks normal.
    Here is the behavior if I add a label inside this component:
    The scroll bar disappears and I'm unable to close the itemrenderer correctly.
    Has anyone come across this issue before? Thanks for any help on this one!

    I can't post all of the code since it's on a much larger page but hopefully this gives you an idea:
    <custom:ClientPlans xmlns:mx="http://www.adobe.com/2006/mxml" width="920" height="550" xmlns:flexlib="http://code.google.com/p/flexlib/"
            fontFamily="HelveticaNeue Condensed" fontSize="11"
            xmlns:components="components.*"
            disabledColor="#FFFFFF"
            themeColor="#FFFFFF"
            horizontalScrollPolicy="off"
            verticalScrollPolicy="off" 
            backgroundColor="#ffffff"
            cornerRadius="10"
            borderStyle="solid"
            borderThickness="0"
            horizontalCenter="0" verticalCenter="0" color="#808080">
    <mx:AdvancedDataGrid id="adgPlans" width="100%" height="497" selectionMode="singleRow" editable="false"
                            color="#000000" fontSize="14" selectable="true"
                            liveScrolling="false"
                            showHeaders="false" variableRowHeight="true"
                            disclosureOpenIcon="@Embed(source='/images/gridMinus.png')"
                            disclosureClosedIcon="@Embed(source='/images/gridPlus.png')"
                            folderOpenIcon="@Embed(source='/images/folderOpenIcon.png')"
                            folderClosedIcon="@Embed(source='/images/folderclosedIcon.png')" borderThickness="1" borderStyle="solid">
                              <mx:dataProvider>
                                     <mx:GroupingCollection id="gcGroup">
                                            <mx:grouping>
                                                <mx:Grouping>
                                                    <mx:GroupingField name="ClientName"/>
                                                </mx:Grouping>
                                            </mx:grouping>
                                     </mx:GroupingCollection>
                              </mx:dataProvider>       
                            <mx:columns>
                                <mx:AdvancedDataGridColumn id="clientNameColumn" dataField="clientName" headerText="Client" sortable="true" width="200" />
                            </mx:columns>
                            <mx:rendererProviders>
                                <mx:AdvancedDataGridRendererProvider
                                    column="{clientNameColumn}"
                                    columnSpan="0"
                                    depth="2"
                                    renderer="components.subcomponents.clientRenderer3"/>
                            </mx:rendererProviders>
                        </mx:AdvancedDataGrid>
    </custom:ClientPlans>
    Code-Behind:
    // ActionScript file
    package com.name
            import mx.controls.AdvancedDataGrid;
        public class ClientPlans extends Canvas
            public var adgPlans:AdvancedDataGrid;
         public function ClientPlans ()
                super();
                this.addEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler);
            private function creationCompleteHandler (event:FlexEvent):void
                  trace("cc");
    Item Renderer:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"
        width="100%" height="150" borderStyle="solid" borderThickness="2" borderColor="#56ACD1" cornerRadius="8"
        fontFamily="HelveticaNeue Condensed" color="#000000" backgroundColor="#FFFFFF" backgroundAlpha="1.0">
        <mx:Label text="Hello!?"/>
    </mx:Canvas>

  • Customize Access Requried page with code behind attached to it in sharepoint 2010

    Hi,
    I have modified default AccessDenied page to my custom accessdenied.aspx page and put Request Access button on it and javascript client side redirection to my requestaccess (reqestaccess.aspx, reqestaccess.aspx.cs) application page.
    Here the problem is whenever i try to redirect to custom requesaccess page in _layouts it again shows me accessdenied page since user is not having access.
    I changed requrestaccess to my custom requestaccess through Powershell command (UpdateMapping - 5). I can only modify the UI part of requestaccess.aspx and can not bind code behind where i want user to select combination of what access is required
    on the site, there are lots of controls on requestaccess page e.g. dropdown that fetches data from list\external list and so on.
    I tried many things to attach code behind to requestaccess page e.g. <%@ Page Inherits="codebehind.cs" /> and all.
    Q - How can i redirect user to custom request access page (includes both aspx, aspx.cs) and allow user to interact with custom page? Is there any way OR WORKAROUND to do this in Sharepoint 2010?
    OR
    Can we overide with ElevetedPermissions in UI\CodeBehind and show the application page to user?
    OR
    Can user access application page even though they donot have rights to access site? Anything will do.
    OR
    In short, I need to redirect a user to some .aspx\.aspx.cs page from AccessDenied page, irrespective of user having access or not. 
    I hope question is clear enough to understand the issue. :)
    Regards,
    Rahul

    Hi,
    According to your post, my understanding is that you had an issue about the custom Access Required page.
    Microsoft supported using code behind, but for these pages it seemed some difference.
    However, as a workaround, we can put all the functionality to the aspx page directly.
    http://umbraes-tower.blogspot.com/2011/10/custom-request-access-page-in.html
    More reference:
    http://onlinecoder.blogspot.com/2011/05/how-to-customize-requestaccess.html
    http://oszakiewski.net/eric/customizing-the-access-request-page-in-sharepoint-2010
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • How to Get Resource value which are referred in code behind file using IResourceProvider

    Hi Everyone,
    Currently I'm working on moving the Resource file from "App_GlobalResources" to Database by using IResourceProvider. I created a CustomResourceProvider project using ResourceProviderFactory and able to get the resource values from DB which
    are used in aspx page.
    But i'm not able to get the values which are referring from code behind file.
    Ex: Label1.Text = Resources.Common.Car; // This is still coming from resx file.
    Can any one please let me know how to get the value from DB instead of resx file which are referred in cs file.
    Appreciate your help. 
    The below code uses the ResourceProviderFactory which calls this method and gets it from DB. Please let me know if you need any more info.
    public class DBResourceProviderFactory : ResourceProviderFactory
            public override IResourceProvider CreateGlobalResourceProvider(string classKey)
                return new DBResourceProvider(classKey);
            public override IResourceProvider CreateLocalResourceProvider(string virtualPath)
                 // we should always get a path from the runtime
                string classKey = virtualPath;
                if (!string.IsNullOrEmpty(virtualPath))
                    virtualPath = virtualPath.Remove(0, 1);
                    classKey = virtualPath.Remove(0, virtualPath.IndexOf('/') + 1);
                return new DBResourceProvider(classKey);
    Regards, Ravi Neelam.

    Hi Ravi Neelam.
    >>Currently I'm working on moving the Resource file from "App_GlobalResources" to Database by using IResourceProvider.
    Based on this message, your issue related to web application, questions related to Asp.Net should be posted in
    Asp.Net forum.
    Please reopen a new thread in that forum. You will get more efficient response.
    Regards,
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Can't export in code behind

    Post Author: glauzier
    CA Forum: Exporting
    Hi,
    I have a web application in VB.NET that generates reports and export them in pdf or excel in code-behind...
    The application runs well and someday, I get this error:
    ParameterFieldCurrentValueException was unhandled by user code
    "Exception de HRESULT : 0x8004101A"
    On the line, reportdocument.Export()
    <code>
    With RemplirDataSet() 'Function rturning an object of type report document
    .ExportOptions.ExportDestinationType = _
    CrystalDecisions.Shared.ExportDestinationType.DiskFile
    .ExportOptions.ExportFormatType = _
    CrystalDecisions.Shared.ExportFormatType.PortableDocFormat
    .ExportOptions.DestinationOptions = dfdoCustomers
    .Export()
    .Close()
    .Dispose()
    End With
    </code>
    I am sure that all parameters are filled correctly.
    I run with :
    VisualStudio 2005
    Crystal Report for Visual Studio 2005 10.2.3600.0
    Do I need to install a service pack? which one? others suggestions?
    Thanks

    Holy cow, I got the export to work -- I have no idea what I did or if this works for anyone, but retracing my steps....
    -I deleted all photos that were in the trash both in iPhoto and in the Finder
    -Just for the heck of it, I tried some of the other exporting options to see how they work. (I'm a relatively infrequent user of iPhoo, hence my still working with version 2.0.1) I exported a few photos to see how the quicktime slideshow works...then I exported for web viewing. Both worked fine. Then I exported the photos...fullsize images...original format...use filename...use extention....and it worked!
    It was almost as if doing the other exports somehow fixed the issue in the finder where I kept getting the duplicate photo message which forced me to try the drag and drop method which also didn't work (see above posts).
    One downside: The export does not preserve the original dates fo import from my camera....bummer....I really like the chronological way iPhoto lets me view my photos...without that, in my newly created "iPhoto export" folder I have to do lots of guessing as to when particular pictures were taken.
    Again, *your mileage may vary* -- I have no idea what (if any) effect the above had for me. But maybe this will help someone...somewhere.
      Mac OS X (10.3.9)  

  • Can FC put action script in a 'code behind'.

    Once of the practices I do in FB3 is to move all my action script into 'code behind' files instead of having all the code in the mxml files.  Does FC have the option to do that (as part of the gen process) and if not, does anyone else who 'codes' instead of 'designs' feel that is a benefit?  I know I'd prefer it to be in a 'separate' as3 file.  Also, if I DO move the code into code behinds (I've not tried it yet), does FC have any issues reading the code behind?  I'll be trying that on a 'simple' project to be sure but figured I'd ask just in case anyone else wants to know...

    The two references cited helped answer questions about Adobe's overall philosophy and approach that came up as I worked a simple example down the design/development stack of tools from Illustrator (AI) to Catalyst (FC) to Flash Builder 4 (FB).
    Other questions that arose were:
    Each application (AI, FC, FB) contains tools for design with some degree of overlap.
    Will FC eventually include from AI (or Photoshop, InDesign, etc.) and the FB design view all functionality needed for interactive storyboarding and skin generation?
    Is it the intent for FC to become the designer's tool and FB the developer's tool, at least for application design?
    The diagram in the Gumbo skinning spec shows that base components and their subclasses are typically implemented in AS and skins in MXML and recommends this as the preferred design pattern. Yet when I converted one of my groups (essentially a form) to a customized component, and exported the project into FB, I noticed that FC had generated a single mxml file (CustomComponent1 ...) and not a pair of files (an X.as file for the base component and an X.mxml file for the skins).
    For several reasons, wouldn't you want to generate separate files as depicted in the Gumbo diagram as a starting point for code customization?
    How does one develop custom components in FB (or using AI+FC+FB) and package them as a library so that they can be dropped into FC and used in the way that the current set of 5 components (button, hscrollbar, vscrollbar, text input and data list) are used?
    How will I integrate my hand-coded dynamic components for data visualization alongside more generic and static app components on an RIA page?
    How would I use AI+FC to design liquid layouts where children at each level often utilize constraints (i.e. top, bottom, left, right) between parent and child?
    For agile methodologies, how will refactoring the interaction or software design work in this new world where interaction designers are trying to maintain full control over appearance and interactive behavior?
    Finally, I would like to know what tools and steps Ely used to develop the component shown in the video. It would be instructive to turn that into a tutorial that we could walk through, step by step, in slow motion
    While I understand the arguments for separation of design and development as a workflow methodology, those of us with development and HCI/visualization backgrounds building research prototypes would like to see integration of the design and development tools (from the perspective of the workflow, not the architecture and code).
    As Jordan said, the direction you are heading is inspiring. Keep up the good work.

  • Extending component with code behind

    Hi,
    I have read an article about extending components with code
    behind:
    http://www.adobe.com/devnet/flex/quickstart/building_components_using_code_behind/
    I have a question about that. Maybe someone can help me.
    Example:
    {components/CartClass.as}
    package components
    public class CartClass extends DataGrid
    public function CartClass()
    super();
    {components/Cart.mxml}
    <?xml version="1.0" encoding="utf-8"?>
    <shop:CartClass xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns:shop="components.*"
    >
    </shop:CartClass>
    Everthing works fine but when i add:
    <mx:columns>
    <mx:DataGridColumn headerText="Title" />
    </mx:columns>
    between the shop:CartClass tag, Flex says:
    Could not resolve <mx:columns> to a component
    implementation
    Anyone knows why?

    "sjerry-" <[email protected]> wrote in
    message
    news:gcq38m$1rg$[email protected]..
    > Hi,
    >
    > I have read an article about extending components with
    code behind:
    >
    http://www.adobe.com/devnet/flex/quickstart/building_components_using_code_behin
    > d/
    >
    > I have a question about that. Maybe someone can help me.
    >
    > Example:
    > {components/CartClass.as}
    > package components
    > {
    > public class CartClass extends DataGrid
    > {
    > public function CartClass()
    > {
    > super();
    >
    > }
    > }
    > }
    >
    >
    > {components/Cart.mxml}
    > <?xml version="1.0" encoding="utf-8"?>
    > <shop:CartClass xmlns:mx="
    http://www.adobe.com/2006/mxml"
    > xmlns:shop="components.*"
    > >
    >
    > </shop:CartClass>
    >
    > Everthing works fine but when i add:
    > <mx:columns>
    > <mx:DataGridColumn headerText="Title" />
    > </mx:columns>
    >
    > between the shop:CartClass tag, Flex says:
    > Could not resolve <mx:columns> to a component
    implementation
    columns is actually a property of the DataGrid instance,
    rather than the
    DataGrid class itself, so it needs to be in the same
    namespace as the actual
    DataGrid subclass:
    <shop:columns>
    <mx:DataGridColumn headerText="Title" />
    </shop:columns>

  • Infopath 2010 Web Form will not run code behind or load External Lists after FormEvents_Loading added

    Building a form to edit and create data in external list. The business rules do not allow for creation in an external list bound InfoPath form. (We are cascade filtering multiple drop down lists from external content type).
    All works to write code behind to push new record or update record in external list. The big issue came when trying to add FormEvents_loading event to the code to capture URL parameter. I want to be able to pass the Primary Key of the record to
    edit, load the data into the form and allow editing and submit. I have tested by manually entering the data and the form works. The form will no longer load data from external lists for the drop downs and shows an error stating "The custom code
    in the form cannot be run. This functionality may be deactivated
    on the server. For more information, contact the server farm administrator."
    I think this is related to moving from the normal forms services into sandboxed code service. Is there a way to access external content types and still have form loading event capture URL parameters?
    The code to capture the URL is listed below:
    XPathNavigator myNav1 = this.MainDataSource.CreateNavigator();
    string InputF1 = string.Empty;
    if (e.InputParameters.ContainsKey("AuthPK"))
    InputF1 = e.InputParameters["AuthPK"];
    myNav1.SelectSingleNode("/my:myFields/my:CodeData/my:DatabaseUpdateStatus", this.NamespaceManager).SetValue(InputF1);
    myNav1.SelectSingleNode("/my:myFields/my:CodeData/my:pk_tblOFCAuthorizations", this.NamespaceManager).SetValue(InputF1);
    else
    myNav1.SelectSingleNode("/my:myFields/my:CodeData/my:pk_tblOFCAuthorizations", this.NamespaceManager).SetValue("0");
    Is there another way to pass parameters to the form? I tried using web part connection, but that does not work with code behind form at all, which would stop me from updating external list.

    Hi,
    As this question is more related to InfoPath development, I suggest you post it to Visual Studio Tools for Office (VSTO) Forum, more experts will assist you with this issue.
    Visual Studio Tools for Office (VSTO) Forum:
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=vsto
    Best Regards,
    Lisa Chen
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]

  • Code-behind + Design Mode = ... ?

    Hello everybody
    I'm trying to step into the Flex world from the right side. That's why I started using Code-behind pattern right away (in a search for info I've also foundCode-in-Front pattern... anyone interested? ). Well, the problem is - I create the combined element with it's logic and then extend it through MXML, and then I instantiate it in the main MXML file. So far everything good, but Design Mode now shows a white box with a red cross inside instead of my custom coded component with it's buttons, combos, etc. Is there any solution to that?

    Ouch...
    I have no problem with compiler. The App runs and works fine
    Is MVC approach compatible with design mode?
    Can you point me to some good MVC framework? Maybe PureMVC?

  • How do I add an image next to a hyperlink in code behind?

    I am trying to dynamically display hyperlinks in a div, and I am also trying to add an image to appear right next to each hyperlink. My code is able to add the hyperlinks to the div's but I can't figure out how to add an image to appear next to each hyperlink.
    I am not pretty good at doing this in the code behind, which is what the requirements demand. Can anyone please point me in the right direction? I am basically trying to add an image right next to each hyperlink as they are dynamically created. Here is what
    my code looks like...
    using (SPSite site = new SPSite(siteUrl))
    List<string> output = new List<string>();
    SPWeb web = site.RootWeb;
    SPList list = web.Lists["Applications"];
    SPQuery testQuery = new SPQuery();
    testQuery.Query = "<Where><Eq><FieldRef Name='Title'/><Value Type='Text'>" + MyEditorPartChoice + "</Value></Eq></Where>";
    foreach (SPListItem item in list.GetItems(testQuery))
    DynLink = new HyperLink();
    dynDiv = new HtmlGenericControl("DIV");
    lbl = new Label();
    environment = Convert.ToString(item["Environment"]);
    appUrl = Convert.ToString(item["App URL"]);
    lbl.Text = "<br>";
    dynDiv.ID = "dynDivCode";
    dynDiv.Style.Add(HtmlTextWriterStyle.Height, "40px");
    dynDiv.Style.Add(HtmlTextWriterStyle.Width, "100%");
    dynDiv.InnerHtml = environment;
    DynLink.NavigateUrl = appUrl;
    DynLink.Text = dynDiv.InnerHtml;
    DynLink.Visible = true;
    Controls.Add(DynLink);
    Controls.Add(lbl);
    I really appreciate the help

    I figured it out...just did this.
    Image img = new Image();
    img.ImageUrl = ;//ImgUrl;
    img.Style.Add("Position", "absolute");
    Hope that helps someone else who is wanting to do this for the first time.

  • How to call a Web Api from from a Visual webpart code behind?

    Hi,
    I am trying to create a visual web part in sharepoint 2013 with data received from another Web API.
    I followed the below steps.
    1. Created a Visual Web part.
    2. In the code behind(.cs) file I wrote the following code.
     async private void GetResult()
                using (var client = new HttpClient())
                    client.BaseAddress = new Uri("http://localhost:8080/");
                    client.DefaultRequestHeaders.Accept.Clear();
                    client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
                    var response = await client.GetAsync("api/Tfs/OpenEnquiriesCount");
                    var content = response.Content;
    3. When I run the application, I get security exception in the line await
    client.GetAsync()
    What is the way to achieve this? How to call a web api from share point visual web part?
    Thank you in advance.

    Hi,
    Thanks for your sharing.
    Cheers,
    Jason
    Jason Guo
    TechNet Community Support

  • How to find out the code behind a button

    Hi,
    What technique should I use to find out what java code is invoked when I click on a button in the portal?
    More concrete: I want to know the code behind the button I'm talking about <a href="https://forums.sdn.sap.com/thread.jspa?threadID=188251">here</a>.
    T h a n k s !
    Jeroen

    I would suggest you use HTTPWatch in your browser to see what is happening behind you button click.
    You can get it here
    <a href="http://www.simtec.ltd.uk/">http://www.simtec.ltd.uk/</a>

  • Custom Master Page with Code behind in SharePoint 2013

    Hi All,
    I want to create the Custom Master Page in Sharepoint 2013 with Code file in it.
    Is it possible to create? if YES the how i can achieve it??
    PD

    To add something to Amit's reply, you can refer to the following link on how to create master page with code behind if you are new to ASP.net.
    Walkthrough: Creating and Using ASP.NET Master Pages in Visual Web Developer
    http://msdn.microsoft.com/en-us/library/ehszf8ax(v=vs.90).aspx
    Miles LI TechNet Community Support

  • Location for login.aspx code behind?

    I added a Login.aspx.cs file in the Server Project with some code in
    Page_Load() I need to implement, and edited the first line of login.aspx this way:
    <%@ Page Language="C#" CodeBehind="Login.aspx.cs" Inherits="Microsoft.LightSwitch.Security.ServerGenerated.Implementation.LogInPageBase" %>
    What I added, exactly, are the Language and CodeBehind
    properties.
    But when I deploy and run the application, I get this error:
    The type 'Microsoft.LightSwitch.Security.ServerGenerated.Implementation.LogInPageBase' is ambiguous: it could come from assembly 'C:\testing\Sandbox\bin\Microsoft.LightSwitch.Server.DLL' or from assembly 'C:\testing\Sandbox\bin\Application.Server.DLL'.
    Please specify the assembly explicitly in the type name.
    I understand this is because Login.aspx.cs already exists in some assembly.
    Is there any way to Access Login.aspx code behind?
    If not, how can I add my own login page to an HTML Client App without losing the already configured Forms security, roles, permissions, etc.?
    thanks.
    Nicolás.
    Nicolás Lope de Barrios
    If you found this post helpful, please "Vote as Helpful". If it actually answered your question, please remember to
    "Mark as Answer". This will help other people find answers to their problems more quickly.

    Josh:I tried your suggestion, edited Login.aspx like you said, and the code for Login.aspx.cs converted from vb is this:
    using System;
    using System.Collections.Generic;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.Security;
    using Microsoft.LightSwitch;
    using LightSwitchApplication;
    using LightSwitchApplication.Helpers;
    namespace LightSwitchApplication
    public partial class Login : Microsoft.LightSwitch.Security.ServerGenerated.Implementation.LogInPageBase
    protected void Page_Load(object sender, EventArgs e)
    AuditHelper.CreateAuditTrailForLogin();
    public Login()
    Load += Page_Load;
    As you can see, all I want to do is call AuditHelper.CreateAuditTrailForLogin()
    on Page_Load()
    But I'm getting this exception, wich is obvious what it means, but I don't know how to fix. Does it mean we're overriding Server generated Page_Load() so I have to write all the code that handles authentication?:
    The method or operation is not implemented.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.             
    Exception Details: System.NotImplementedException: The method or operation is not implemented.
    Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.                  
    Stack Trace:
    [NotImplementedException: The method or operation is not implemented.]
    LightSwitchApplication.Login.Page_Load(Object sender, EventArgs e) +36
    Microsoft.LightSwitch.Security.ServerGenerated.Implementation.LogInPageBase.OnLoad(EventArgs e) +90
    System.Web.UI.Control.LoadRecursive() +71
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3178
    Any help appreciated.
    Nicolás Lope de Barrios
    If you found this post helpful, please "Vote as Helpful". If it actually answered your question, please remember to
    "Mark as Answer". This will help other people find answers to their problems more quickly.

  • "Object Required" error when using the script block from the code behind

    I try to use the following script block on the code behind page
    <script defer='true' id='NavID' type='text/javascript'>Nav();</script>
    and the function Nav() is on the .aspx page. It gives me the "Object Required" error message. BUT if I add an alert("hello!!!") line inside of the Nav() function, it works fine after the user closes the alert box. Has anyone experienced a similar problem? Please help. Thanks.

    There is no way to troubleshoot this by looking at a picture of the diagram. LabVIEW 6 is almost prehistory and many things have changed, especially the file IO all looks different so it is impossible to tell what you are doing.
    Error 7 is file not found, so most likely your string operations are not correct. What are the full strings? What is the final file name (maybe you are missing a "\" or maybe you are on a different OS type). Put an indicator at the path wire to see what's happening!
    Is this a datalog file?
    (Overall, the code is a bit suspect. Nobody needs a seven frame flat sequence. ) Why do a control and an indicator have the same label?)
    LabVIEW Champion . Do more with less code and in less time .

Maybe you are looking for

  • HT3819 how do I tell apple tv that my appleid has changed?

    I have changed my apple ID. The apple TV still thinks the old one is in use and when I give it the new one, it says it isn't correct. I have made sure that I turned on home sharing with Itunes and have given it my correct Apple ID.

  • Amnesia: The Dark Descent crash error (GMA 950 Macbook 2,1)

    Hello, Recently, I've found this amazing horror game, and though the game appears to run on other computers with my specs, it fails to on my own, crashing with the same error each time. Can anyone help? This is on OS X 10.6.5. Log: Process: AmnesiaDe

  • Do you use a screen protector? for powerbook.

    Do you use a screen protector for your powerbooks? if so, what do you use?

  • Dreamweaver CS4 compatible with Windows 7 and 8?

    I still work with Dreamweaver CS4 (student version) which is until now still good enough for me. On my desktop I still have XP and on my Laptop Vista. But due to HD filming and probably Office 2013 I need a new desktop and also need to upgrade my Lap

  • Fork process exception: enclosed small code and exception

    A code snapshot is enclosed along with the exception we are getting on our production system. My class file namely as StatementProcessParametersAction.saveParameters() method does following as enclosed the code snippet. CODE ------      String val =