Re: Change the text on an aspx button
- From: Munna <munnaonc@xxxxxxxxx>
- Date: Sun, 18 May 2008 23:22:53 -0700 (PDT)
On May 19, 11:40 am, "K Viltersten" <t...@xxxxxxxxxxxxxx> wrote:
you should change the text on the server as controls aregenerated from
the server to the client. Therefore youshould ignal to the server that
it should change text towhat you need in this scenario (post it to the
server
for example with a hidden form field)
Perhaps i'm doing it a strange way. I'm changing the text
of the LinkButton using JavaScript on the client and as i
post it back, i try to read the text using the following.
protected void Button1_Click(Object sender, EventArgs e) {
this.Button1.Text = this.Button1.Text + "!"; }
I notice that the "!" gets added at every time so the text
on the button gets more and more exlamation marks. Still,
i figure it should be possible to change the original text
of the button to something else and then send it back to
server. For some reason, the server only remembers the
text sent out at previous attempt.
And just to be perfectly clear - i can use a button as such
a field, right? Or are we taking about a specialized, hidden
componenet here?
--
Regards
Konrad Viltersten
Hi
on post back of the page simply check your link's text
and re assign your text depanding on your desired value.
you can take a hidden field in your page mark it as runat server.
in javascript when you change the text of the link mark the hidden
input to know that links text is chnage
when page post back .. grap the value of the hidden field and then
depending on value modify your links
text.
Thanks
Munna
www.munna.shatkotha.com
www.shatkotha.com
.
- Follow-Ups:
- Re: Change the text on an aspx button
- From: K Viltersten
- Re: Change the text on an aspx button
- References:
- Change the text on an aspx button
- From: K Viltersten
- Re: Change the text on an aspx button
- From: Teemu Keiski
- Re: Change the text on an aspx button
- From: K Viltersten
- Change the text on an aspx button
- Prev by Date: Re: MasterPage
- Next by Date: RE: FormView
- Previous by thread: Re: Change the text on an aspx button
- Next by thread: Re: Change the text on an aspx button
- Index(es):
Loading