Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - newbie: Problems with LoginView

 
Thread Tools Search this Thread
Old 07-08-2006, 08:23 PM   #1
Default newbie: Problems with LoginView


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
  Reply With Quote
Old 07-08-2006, 10:14 PM   #2
Jeff
 
Posts: n/a
Default CASE SOLVED
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
  Reply With Quote
Old 07-09-2006, 02:24 AM   #3
Jack
 
Posts: n/a
Default Re: CASE SOLVED
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
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

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




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46