Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
85
WebTextEditor, WebForm Model Binding
posted

Good day all!!! I'm new to Infragistics, ASP and all. I trying to develop a web app that has a login screen. I have managed to design th login form using web forms.

The web form has a 'user' model that has username and password fields.

I'm using a WebTextEditor to catch the input but I have not ideal on how to 'bind' it to the model. using html helpers I see the do this: TextBoxFor(a=>a.Username),or something like that. So that went it posts the value is sent to the model. How do I achieve the same when using:
<ig:WebTextEditor ID="User_Password" runat="server" Width="100%" TextMode="Password" NullText="Password"></ig:WebTextEditor>

Parents
  • 18204
    Suggested Answer
    Offline posted

    Hello Allen Zinyama,

     

    Thank you for posting in our forums!

    Since our ASP.NET controls are not supported in an MVC application, we do not provide such methods for them.  Our Infragistics ASP.NET controls are designed for WebForms applications.  Our IgniteUI controls do support MVC usage and we do provide similar methods for the HTML helpers.

    I would recommend using our IgniteUI controls.  The HtmlHelper for the igTextEditor has the ability to bind to the model.  The following code shows an example of this:

    @Html.Infragistics().TextEditorFor(x => x.Name).Render();

    @Html.Infragistics().TextEditorFor(x => x.City).Render();

    @Html.Infragistics().TextEditorFor(x => x.Country).Render();

    I have also attached a sample that demonstrates how this can be used with our igTextEditor.  You can edit the current information and click the Update button to update the model with the data in the Update action.  The different links along the top of the page will take you to other Customer info to edit.

    If you have any further quesitons or concerns with this, please let me know.

    HelperModelBinding.zip
Reply Children
No Data