473,320 Members | 2,024 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

LoginView cant find controls...

Seb
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
Jun 27 '08 #1
2 1172
On May 13, 4:02 pm, Seb <sebastianthegreat...@gmail.comwrote:
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
Jun 27 '08 #2
Seb
On May 13, 2:10 pm, CreativeMind <aftab.pu...@gmail.comwrote:
On May 13, 4:02 pm, Seb <sebastianthegreat...@gmail.comwrote:
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?
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: RedEye | last post by:
Hello, I have been looking for a way to add roles to a LoginView control programmatically and it's not working. I have called the sub at init and load and neither work. Does anyone know what I...
3
by: ad | last post by:
I use a LoginView to authenticate user. Can we set the focus in the UserName or Password of the LoginView?
2
by: LLars | last post by:
Hey, I have the following problem: I have an asp-page which contains a loginview with two templates (loggedin- and anonymoustemplate). How can I access a textbox inside the the loggedintemplate...
0
by: keithb | last post by:
Using Website | ASP.NET Configuration, I set up a role name Administrators and a user named admin. In my application, I put a LoginView Conrol on my master page. The LoginView control has an...
1
by: Phil | last post by:
I have gridview with a templatefield in which is a loginview. The loginview displays a delete linkbutton for a specified group only. when a record is delete the loginview displays the contents of...
3
by: =?Utf-8?B?am1obWFpbmU=?= | last post by:
When I put asp controls inside the LoginView it removes the codebehind references so that the page will not build. For example: <asp:LoginView ID="LoginView" runat="server" > <LoggedInTemplate>...
2
by: jsqrd | last post by:
Can anyone tell me me if the two subject controls work when using a SQL Server database as opposed to a SQL Server Express instance? If so, what's the trick to making it work? I have the role...
1
by: Morgan Cheng | last post by:
I tried to add a LoginView control in OnClick eventhandler of a button. The code is like below LoginView login = new LoginView(); PlaceHolder1.Controls.Add(login); After run the page, I...
2
by: Jeff | last post by:
Hey ASP.NET 2.0 I'm about to start programming a new website at work. My boss want's me avoid using the Membership system in ASP.NET 2.0 (probably because he don't understand how it...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.