![]() |
|
|
|||||||
![]() |
ASP Net - newbie: Problems with LoginView |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Hey
asp.net 2.0 Sorry but I'm a newbie that's trying to learn asp.net 2.0. And I've come across something within LoginView I don't understand.... In code view I can access a label placed directly on a webpage.. But I cannot access a label control placed within a LoginView control on the same form. I guess this isn't just about Labels, I have the same problem with TextBoxes too.... Lets say I've placed a textbox in a loginview, and called the textbox "txtSomething". When I in code view start typing "tx"... the type ahead (drop down list with available properties, what is it's real name??) appear, but no txtSomething can be found.... But it works if the textbox is placed outside the LoginView I've also tryed to access the TextBox this way: LoginView1.LoggedTemplate. But the type ahead don't show the textbox here either.... What should I do to access the controls in LoginView from code view? Jeff Jeff |
|
|
|
|
#2 |
|
Posts: n/a
|
Hey
I've just solved the problem by using LoginView.FindControl(); "Jeff" <> wrote in message news:... > Hey > > asp.net 2.0 > > Sorry but I'm a newbie that's trying to learn asp.net 2.0. And I've come > across something within LoginView I don't understand.... > > In code view I can access a label placed directly on a webpage.. But I > cannot access a label control placed within a LoginView control on the > same form. I guess this isn't just about Labels, I have the same problem > with TextBoxes too.... > > Lets say I've placed a textbox in a loginview, and called the textbox > "txtSomething". When I in code view start typing "tx"... the type ahead > (drop down list with available properties, what is it's real name??) > appear, but no txtSomething can be found.... > > But it works if the textbox is placed outside the LoginView > > I've also tryed to access the TextBox this way: > LoginView1.LoggedTemplate. But the type ahead don't show the textbox here > either.... > > What should I do to access the controls in LoginView from code view? > > Jeff > Jeff |
|
|
|
#3 |
|
Posts: n/a
|
Yes, I had a similar thing. I also think you have to cast the web control as
well; see my code I use: (CheckBox)LoginViewMain.FindControl("CheckBoxPDF") ).Checked == true; // Set the Checkbox to true Jack. "Jeff" <> wrote in message news:%... > Hey > > I've just solved the problem by using LoginView.FindControl(); > > > > > "Jeff" <> wrote in message > news:... >> Hey >> >> asp.net 2.0 >> >> Sorry but I'm a newbie that's trying to learn asp.net 2.0. And I've come >> across something within LoginView I don't understand.... >> >> In code view I can access a label placed directly on a webpage.. But I >> cannot access a label control placed within a LoginView control on the >> same form. I guess this isn't just about Labels, I have the same problem >> with TextBoxes too.... >> >> Lets say I've placed a textbox in a loginview, and called the textbox >> "txtSomething". When I in code view start typing "tx"... the type ahead >> (drop down list with available properties, what is it's real name??) >> appear, but no txtSomething can be found.... >> >> But it works if the textbox is placed outside the LoginView >> >> I've also tryed to access the TextBox this way: >> LoginView1.LoggedTemplate. But the type ahead don't show the textbox here >> either.... >> >> What should I do to access the controls in LoginView from code view? >> >> Jeff >> > > Jack |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Newbie c++ problems | rohankataria26 | Software | 1 | 06-06-2007 11:29 PM |
| Newbie Please Help - Wireless problems | nufc_fan | Hardware | 3 | 10-19-2006 05:08 PM |
| Newbie: Cabling Problems & Progessive (Interlace Or Progressive) Scan Questions, Please | Robert11 | DVD Video | 1 | 05-29-2004 06:16 PM |
| Re: Pioneer DVR-105 and Nero Problems | Flossie | DVD Video | 0 | 08-07-2003 02:25 PM |
| Re: Pioneer DVR-105 and Nero Problems | Flossie | DVD Video | 0 | 08-07-2003 08:11 AM |