Using asp.net 2.0.
I have this code:
protected void Page_Init(object sender, EventArgs e)
{
Login1.LoginButtonText = MyFuncion();
string testtext = Login1.LoginButtonText;
}
It doesn't work.
protected void Page_Load(object sender, EventArgs e)
{
Login1.LoginButtonText = MyFuncion();
string testtext = Login1.LoginButtonText;
}
It doesn't work either.
I put a breakpoint on the "string testtext" line, and I see in the
debugger than the string is correctly being returned by the funcion
"myfunction()" and LoginButtonText property is supposedly to have this
value.
But on the page, the Login1.LoginButtonText is still containing the
default value I setup in design time.
Maybe I'm just not putting this code in the correct place and that's
why the text is set back to its original value later, I tried preinit,
but I got "object not set" errors there.
Maybe I should not use this LoginButtonText property that BTW, I get no
idea where it comes from. I'd like to use something like
"Login1.LoginButton.Text = myfunction()", but it seems the LoginButton
button is not accessible from nowhere.
So, how do I change the text of the loginbutton in the login form on
the fly ?