This is a migrated thread and some comments may be shown as answers.

RadTextBox Text Property

3 Answers 73 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 10 Nov 2011, 09:53 PM
I'm trying to use a RadTextBox.

I've got code like this in the Page_Load event handler:

 

 

if (!IsPostBack)

 

{

    RadTextBox1.Text = "1";
}


This correctly sets the value of the text box control.  However, if I type something else into it on my web page, when I read the value of the text box by looking at the Text property in an event handler from an OnClick event on an ImageButton I get the original value that was set, not the value I have typed into the text box.

If I replace it with a standard ASP.NET text box, it works as expected, and I can read the value I have typed. This also only seems to happen on one of my pages.  I've got another similar page that uses a RadTextBox and works. 

Is there anything that might cause this issue?

Kind Regards, Richard

3 Answers, 1 is accepted

Sort by
0
James Campbell
Top achievements
Rank 1
answered on 10 Nov 2011, 10:09 PM
Hi Richard,

Can you show us an example of your code in full context?

You can also try the client object get_value.
http://www.telerik.com/help/aspnet-ajax/input-client-side-radtextbox.html

Thanks,
JIm
0
Richard
Top achievements
Rank 1
answered on 10 Nov 2011, 10:49 PM
Thanks Jim

I have actually just managed to solve this literally 1 minute ago.  It was nothing to do with the control or the page - I'd noticed the page_load event was being fired twice and tracked this down to a bug in some URL rewriting logic which was causing the axd file that is posted back to to be rewritten with the URL of the page which confused everything.

Kind Regards, Richard
0
James Campbell
Top achievements
Rank 1
answered on 14 Nov 2011, 10:34 AM
Richard,

Exactly what I was thinking but without your code hard to assume, glad you solved your issue.

Thanks,
Jim
Tags
General Discussions
Asked by
Richard
Top achievements
Rank 1
Answers by
James Campbell
Top achievements
Rank 1
Richard
Top achievements
Rank 1
Share this question
or