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

<Validation Location="?" Method="?" /> RadInputManager

11 Answers 97 Views
Input
This is a migrated thread and some comments may be shown as answers.
Joel Kraft
Top achievements
Rank 2
Joel Kraft asked on 12 Jun 2009, 02:31 PM
The documentation for RadInputManager shows validation properties intended to allow validation to occur against a web service or page method.  What I cannot find is any specific information about how the signature of the service/method, nor any examples.

What is needed to do this?
Joel

11 Answers, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 15 Jun 2009, 07:09 AM
Hello Joel,

Currently RadInputManager does not provide built-in validation through web service or page method using declarative settings. Can you please specify where you found this information in the product documentation? I browsed the RadInputManager subchapter from the RadInput control online help but was not able to locate it.

Best regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Joel Kraft
Top achievements
Rank 2
answered on 15 Jun 2009, 12:05 PM
Ah well that explains that, doesn't it?

The items pop up in Intellisense and are listed (but not really documented) in the API for the InputSettingValidation class.
http://www.telerik.com/help/aspnet-ajax/telerik.web.ui-telerik.web.ui.inputsettingvalidation_members.html

This functionality is also mentioned in this blog post:
http://blogs.telerik.com/blogs/09-01-29/optimization_tips_radinput_vs_radinputmanager.aspx

Is this functionality coming soon? :-)

Joel







0
Rosen
Telerik team
answered on 18 Jun 2009, 07:59 AM
Hello Joel,

Please excuse us as there seems to be some misunderstanding. The WebService validation is supported by RadInputManager, however there is an issue when validating through .NET 3.5 WebService, which our developers are current investigating.

The service method's signature should be similar to the following:
public bool SomeMethodName(string id, string value) 
Please note that parameters' name and type as method's  return type are mandatory.

I have attached a small sample application which demonstrates the functionality.

Best wishes,
Rosen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Joel Kraft
Top achievements
Rank 2
answered on 18 Jun 2009, 12:51 PM
Well I'm using .NET 3.5... is the issue that it doesn't work? :-)
I just set up a function to return false for testing.  I see that it is getting called successfully, but there is no error.

Joel
0
Rosen
Telerik team
answered on 22 Jun 2009, 06:26 AM
Hi Joel,

I'm happy to inform you that our developers has managed to address the issue in question. Thus  it will be included in Q2 2009 release of the control.

Please excuse us for any inconvenience this may caused you.

Sincerely yours,
Rosen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Joel Kraft
Top achievements
Rank 2
answered on 07 Jul 2009, 12:11 AM
Well... now I'm using the 2009.2 version of the control, but I don't see any difference at all.
I still see that the page method is being called, but don't see any error displayed when it returns false!
0
Sebastian
Telerik team
answered on 07 Jul 2009, 08:51 AM

Hello Joel,

This feature of our RadInputManager is presented in the following online demo of the product:

http://demos.telerik.com/aspnet-ajax/input/examples/radinputmanager/validationthroughwebservice/defaultcs.aspx

Can you please verify the correct behavior there and outline the differences between your implementation and this presented in the example? Thus we will do our best to advice you how to address the issue.

Kind regards,

Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Joel Kraft
Top achievements
Rank 2
answered on 07 Jul 2009, 11:56 AM
The only big difference I can see is that I am using a Page method, and I'm not trying to do any server-side stuff right now.  Here is a stripped down piece of code that demonstrates the issue:

<%@ Page Language="c#" EnableViewState="true" Layout="Standard" Title="Site User Impersonation" %>
<%@ Import Namespace="System.Web.Services" %>
<script runat="server">

private void btnConfirm_Click(object sender, EventArgs e)
{
    if (!Page.IsValid) return;
    Response.Write("Done!");
}

[WebMethod]
public static bool ValidateUser(string id, string value)
{
    return false;
}
    
</script>

<asp:Content ContentPlaceHolderID="MainContent" runat="server">

<asp:TextBox runat="server" id="tbUsername" Columns="15" MaxLength="8" />
<asp:Button runat="Server" id="btnConfirm" OnClick="btnConfirm_Click" Text="Go!" />

<TELERIK:RadFormDecorator runat="server" EnableRoundedCorners="false" DecoratedControls="Buttons,RadioButtons" />
<TELERIK:RadInputManager runat="server">
    <TELERIK:RegExpTextBoxSetting ValidationExpression="[a-z]{3}[0-9]{0,4}" ErrorMessage="Invalid">
        <Validation IsRequired="true" Location="Impersonate.aspx" Method="ValidateUser" />
        <TargetControls>
            <TELERIK:TargetInput ControlID="tbUserName" />
        </TargetControls>
    </TELERIK:RegExpTextBoxSetting>
</TELERIK:RadInputManager>
</asp:Content>

This is ASP.NET 3.5 under Windows 2008.  The input manager does deal with the regular expression correctly, and it does call the page method.  According the FireBug, the following data goes back and forth:
{"id":"ctl00_ctl00_ContentArea_MainContent_tbUsername","value":"jdk66","context":null}
{"d":false}

But there is no indication that there is an error, even though a false response was received.

The other thing I find odd here is that the page method is called even when the regular expression deems the input to be invalid:
{"id":"ctl00_ctl00_ContentArea_MainContent_tbUsername","value":"jd66","context":null}

Joel


0
Accepted
Rosen
Telerik team
answered on 10 Jul 2009, 11:10 AM
Hello Joel,

Indeed I was able to observe the behavior in question. However our developers has managed to addressed it and the fix will be available with the next internal build.

Please excuse us for any inconvenience this may caused you.

Best wishes,
Rosen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Milind
Top achievements
Rank 1
answered on 20 Sep 2009, 06:47 AM
Hi,

The example attached in this thread earlier is ok with one asp control in radinputmanager. If there are more than one control under the radinputmanager then how to handel the validations for each control ?

Thanks & Regards,

Milind Shevade
0
Sebastian
Telerik team
answered on 22 Sep 2009, 11:23 AM
Hi Milind,

You can define different input manager settings in order to validate the user entry for various textbox controls on the page. You may also be interested in the implementation from this integration demo which illustrates how to validate the input inside data bound control (RadGrid in this case) by specifying dynamic input manager settings inside the ItemCreated handler of the grid.

Best regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Input
Asked by
Joel Kraft
Top achievements
Rank 2
Answers by
Sebastian
Telerik team
Joel Kraft
Top achievements
Rank 2
Rosen
Telerik team
Milind
Top achievements
Rank 1
Share this question
or