We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to use custom helper for Tools controls ?

Description:

You can render For controls by using the custom HTML helper. Custom HTML helper is used to reduce the amount of tedious typing of HTML tags that you must perform to create a standard HTML page. You can render multiple control on a page by using the custom helper.

Solution:

Render DatePicker control by using Custom HTML Helper

  1. Using common custom Html Helpers for all the views by placing it in App_Code folder, we suggest you to add the controls by using the corresponding page view.
  2. Define the variable in Model page as shown below,

[VB]

 

  1. You need to refer the following namespace in custom helper page,

 

[VBHTML]

 

  1. Now, Define the helper using the WebPageView element so that the corresponding page view’s scripts references will be inherited and you can add the required controls to the helper in custom helper page which is in App_Code folder.

 

[VBHTML]

 

 

  1. Passing the model to the view page in the controller as shown below,

 

[VB]

 

 

  1. Add the helper created and pass the PageContext.Page to get the corresponding page element in view page.

 

[VBHTML]

 

 

 Note: Similarly, we can render all our Controls by using custom helper.

Article ID: Published Date: Last Revised Date: Platform: Control:
7761 06/13/2017 06/13/2017 ASP.NET MVC General
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon