FromView EditTemplate & ItemTemplate with ObjectContainerDataSource

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Anilsg
    New Member
    • Aug 2007
    • 7

    FromView EditTemplate & ItemTemplate with ObjectContainerDataSource

    Hi Friends,

    I have a FormView with EditItemTemplat e with "Update & cancel " Link & ItemTemplate with "Edit" Link.
    When i run the application the ItemTemplate will be running But When i click on the Edit Link The DropDownList is the EditItemTemplat e is throughing the Null Execption , in this line of Code

    "DropDownList ddl = (DropDownList) FormView1.FindC ontrol("DropDow nList1"); "

    The ddl is null,

    But When i set the FormView Defultmode in the aspx page ie.

    "<FormView id="FormView1" DefaultMode="Ed it" ...>"

    Then the "ddl" will not be null and the data is Binded , But the starting page will be "EditItemTempla te" But i want to "ItemTempla te" as starting page.

    And when i click on the "Update" Link the error is "Id" is read Only, And the services we are getting the "Id" is read only only set; on get; .
    Is there any other way to slove this problem with out making the I "Id" as get;.


    Thanks with regards
    Anil s g
    Last edited by MMcCarthy; Aug 21 '07, 12:02 PM. Reason: email removed - against site rules
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    Anil,

    What is your set up? What are you using to make your code and run it?

    Jared

    Comment

    • Anilsg
      New Member
      • Aug 2007
      • 7

      #3
      Originally posted by jhardman
      Anil,

      What is your set up? What are you using to make your code and run it?

      Jared
      Hi,
      U mean IDE,

      Then I am using Visual studio-2005(8th version) , with Enterprise Library 3.1 & WCSF june 2007.

      Comment

      • jhardman
        Recognized Expert Specialist
        • Jan 2007
        • 3405

        #4
        Originally posted by Anilsg
        Hi,
        U mean IDE,

        Then I am using Visual studio-2005(8th version) , with Enterprise Library 3.1 & WCSF june 2007.
        Moderator, could you send this to the .NET forum?

        Jared

        Comment

        Working...