I get an error to retrieve the text of a RadTextBox in my code behind only with Firefox and Chrome (IE is ok).
Protected Sub btnSubmit_Click(sender As Object, e As EventArgs) Handles btnSubmit.Click
Dim MyLogin1 As String = TxtUsername.Text
If I use in my page:
<
telerik:RadTextBox
ID
=
"TxtUsername"
ValidationGroup
=
"LoginGroup"
MaxLength
=
"30"
runat
=
"server"
></
telerik:RadTextBox
>
I get an error but if I use
<
asp:TextBox
ID
=
"TxtUsername"
ValidationGroup
=
"LoginGroup"
MaxLength
=
"30"
runat
=
"server"
></
asp:TextBox
>
all is fine I get the value.
I don't know if related to that problem but for Firefox and Chrome I have to ad a
If Page.IsValid Then
Also I had the same problem in IE last week when trying to use an hidden captcha.
Thanks for you support
11 Answers, 1 is accepted
Based on the code snippets you have provided I am unable to reproduce the described issue.
Therefore I have attached a sample project for you to run locally. Try to reproduce the problem using this project and let me know if I am missing something.
Deyan Enchev
Telerik
Thanks for your reply, I have tested the sample on a new website and it works without problem with any browser.
If I import the sample into the exisiting project I get the error, the required field validator says that the field is empty even if not.
If I replace the RadTextBox with a simple asp:textbox all is ok.
Regards,
I just found that I had the same problem on another website just after having enabled the .net form authentication in the web.config file without any other change (please see the code bellow).
Any suggestion about it ?
Thanks,
Herve
--------- Web.config ------------------
<location allowOverride="true">
<system.web>
<authentication mode="Forms">
<forms loginUrl="~/login.aspx" slidingExpiration="true" timeout="60">
</forms>
</authentication>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
I am sorry to hear that at your site the problems are still persisting.
Still I am not able to reproduce the issue reported. Attached you can find a project that uses authentication set using your code snippet. Give it a try and let me know what am I missing.
In case the issue still remains on your end it will be best if you could open a regular support ticket and send us small runnable project which demonstrates the exact problem you are facing. Thus we will be able to debug it locally and advise you further.
Deyan Enchev
Telerik
I have installed your sample as a new website and get the same problem.
I'm using visual studio 2012 with the built in server on the latest Windows and have the same problem on my dev server (Windows Server 2012) .net 4.0.
Best regards,
Herve
I am using the latest version of RadControls to test the project on my side. Could you share which version are you using to replicate the issue?
In case you are not with latest version I would advice you to upgrade your environment and retest the issue once more. Let me know how it goes.
Deyan Enchev
Telerik
I'm also using the latest dll that are automatically updated with the manager.
Opening a support ticket in order to get it fixed.
Thanks,
Herve
Once problem has been solved, you can update this forum thread. This will help future users, which are facing the same problem.
Regards,
Telerik
I found that this bug comes from the RadCompression preCondition that was seted on "managedHandler" instead of "integratedMode" for the following reason:
http://www.telerik.com/help/aspnet-ajax/compression.html
Problem
When RadCompression is enabled and you are using .NET 4.0, event handlers might not be raised in a default document in IIS 7 or IIS 7.5 Integrated Mode.
Solution
This problem is caused by a breaking change in .NET 4.0 described here. To workaround it one can set preCondition="managedHandler" for the RadCompression module. You may also need to remove the runAllManagedModulesForAllRequestssetting from your web.config if you have it (or set it to false).
So if there is a solution to have both the default pages and the radtextbox working, I am interested to know it.
Best regards,
Herve
Thank you for sharing your findings with the community. As for using a RadTextBox I would recommend upgrading to the latest internal build.
Regards,
Angel Petrov
Telerik