LoginView cant find controls...

Discussion in 'ASP .Net' started by Seb, May 13, 2008.

  1. Seb

    Seb Guest

    With in my login view I have some labels and a button with a onclick
    event.
    However when I click the button I can only access my controls by
    declaring a new control and using the FindControl method of my
    loginview as shown below. Is this really the best way to do it?


    Label Label1 = (Label)LoginView1.FindControl("Label1");


    best regards
     
    Seb, May 13, 2008
    #1
    1. Advertising

  2. Seb

    CreativeMind Guest

    On May 13, 4:02 pm, Seb <> wrote:
    > With in my login view I have some labels and a button with a onclick
    > event.
    > However when I click the button I can only access my controls by
    > declaring a new control and using the FindControl method of my
    > loginview as shown below. Is this really the best way to do it?
    >
    > Label Label1 = (Label)LoginView1.FindControl("Label1");
    >
    > best regards


    explore 4guysfromrolla.com
     
    CreativeMind, May 13, 2008
    #2
    1. Advertising

  3. Seb

    Seb Guest

    On May 13, 2:10 pm, CreativeMind <> wrote:
    > On May 13, 4:02 pm, Seb <> wrote:
    >
    > > With in my login view I have some labels and a button with a onclick
    > > event.
    > > However when I click the button I can only access my controls by
    > > declaring a new control and using the FindControl method of my
    > > loginview as shown below. Is this really the best way to do it?

    >
    > > Label Label1 = (Label)LoginView1.FindControl("Label1");

    >
    > > best regards

    >
    > explore 4guysfromrolla.com


    Could you perhaps be a bit more specific?
     
    Seb, May 13, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. wikkiwikkiwaa
    Replies:
    2
    Views:
    12,631
    wikkiwikkiwaa
    Aug 9, 2006
  2. =?Utf-8?B?am1obWFpbmU=?=

    Embedding Controls in LoginView removes references

    =?Utf-8?B?am1obWFpbmU=?=, Dec 23, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    1,626
    Erik Funkenbusch
    Dec 27, 2006
  3. Nagaraj
    Replies:
    1
    Views:
    890
    Lionel B
    Mar 1, 2007
  4. Jack
    Replies:
    1
    Views:
    916
    Alessandro Zifiglio
    Jul 3, 2006
  5. Steve Harp

    Accessing Controls in LoginView

    Steve Harp, Feb 22, 2007, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    205
    Teemu Keiski
    Feb 25, 2007
Loading...

Share This Page