Hey Bob,
thank you for the tip with a better newgroup. I thought asp and general was
the right ony, but I see that your suggestion is a much better one.
By the way, I found out that I can access all controls if I use the
FindControl method on the Masterpage. If the trace directive is set to true,
the structure can be seen. I write this, just in case someone reads the
question and hopes for an answer.
Thanks again Bob.
"Bob Barrows [MVP]" wrote:
LLars wrote: Hey,
I have the following problem: I have an asp-page which contains a
loginview with two templates (loggedin- and anonymoustempla te). How
can I access a textbox inside the the loggedintemplat e from the code
behind c# module?
Umm, you don't have an "asp-page": you have an "aspx-page". There is a
difference.
There was no way for you to know it, but this is a classic asp newsgroup.
While you may be lucky enough to find a dotnet-savvy person here who can
answer your question, you can eliminate the luck factor by posting your
question to a newsgroup where the dotnet-savvy people hang out. I suggest
microsoft.publi c.dotnet.framew ork.aspnet.
I tried: (TextBox)Page.F indControl("Tex tBox1") but that will result
in a null pointer.
I also tried:
(TextBox)Page.F indControl("Con tentPlaceHolder 1.LoginView1.Te xtBox1")
with the same result.
No clue. I have not played with .Net 2.0 yet.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.