PC Review


Reply
Thread Tools Rate Thread

Can't get current Textbox value in OnClick

 
 
Cindy Lee
Guest
Posts: n/a
 
      20th Nov 2007
I have an image button that I do an button_click with

protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
stringt value1=TextBox1.Text;

I get the value here ok, but only if I don't set it in the pageload part.
TextBox7.Text="a"; // if this is in the pageload, I will always get "a"

I want to be able to change the value on the page, and have it show up in
ImageButton1_Click. Anyone know why this is happening.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET 1.1 TextBox OnClick Event Stuart Shay Microsoft ASP .NET 5 6th Nov 2006 09:10 AM
how to implement an onclick on asp:TextBox? Jan Hoffman Microsoft ASP .NET 7 8th Sep 2004 12:03 PM
TextBox onClick skc Microsoft Frontpage 2 1st Jul 2004 11:03 AM
Wrong Button.OnClick() for TextBox Lenard Gunda Microsoft ASP .NET 2 1st Jun 2004 08:37 AM
how to set focus on a textbox after onclick of a button sumit Microsoft ASP .NET 1 8th Nov 2003 07:40 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:58 PM.