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

Controlling submit button which validates input manager entry

2 Answers 42 Views
Input
This is a migrated thread and some comments may be shown as answers.
Arnold Guzmán
Top achievements
Rank 1
Arnold Guzmán asked on 24 Oct 2012, 01:04 AM
Hi, 

I want to create a textbox with a button, I tried using RegexTextBox with RadInputManager.  It works fine and does not cause any postback when use the proper button, but I also have another buttons inside my page that are not related to the functionality of the regex, and when the textbox is invalid, it does not cause postback.  I could not find any way to link inputManager just to the button i desire.  

Is that possible?

2 Answers, 1 is accepted

Sort by
0
Accepted
Eyup
Telerik team
answered on 26 Oct 2012, 10:43 AM
Hi Arnold,

You could use ValidationGroup to control your validation configuration:
<asp:TextBox ID="TextBox1" runat="server" ValidationGroup="RegExTextBox"></asp:TextBox> <br /> <br />
<asp:Button ID="Button1" Text="Submit if valid" runat="server" />
<asp:Button ID="Button2" Text="Ignore validation" runat="server" ValidationGroup="RegExTextBox" />
<telerik:RadInputManager ID="RadInputManager1" runat="server">
    <telerik:RegExpTextBoxSetting ErrorMessage="NaN" ValidationExpression="\d+">
        <TargetControls>
            <telerik:TargetInput ControlID="TextBox1" />
        </TargetControls>
    </telerik:RegExpTextBoxSetting>
</telerik:RadInputManager>

I hope this will prove helpful. Please give it a try and let me know about the result.

Kind regards,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Arnold Guzmán
Top achievements
Rank 1
answered on 26 Oct 2012, 10:13 PM
Thanks! 

It worked perfectly!
Tags
Input
Asked by
Arnold Guzmán
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Arnold Guzmán
Top achievements
Rank 1
Share this question
or