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.
Unfortunately, activation email could not send to your email. Please try again.

RequireJS for ASP.NET Webform control

Thread ID:

Created:

Updated:

Platform:

Replies:

132560 Sep 8,2017 08:58 AM Sep 15,2017 08:37 AM ASP.NET Web Forms 3
loading
Tags: RadioButton
Imre Revesz
Asked On September 8, 2017 08:58 AM

Hi!

I use EJ Webform controls in my site: (C#)
www.recognitiongame.com

I want to use RequireJS and have problem with jquery load checking when the page renders the radiobuttons. 

An example from one of my EJRadiobuttons in my .aspx file:
<ej:RadioButton ID="Ujjatekindit_EJRadioButton" runat="server" Name="Ujjatekindit_Radio" OnChange="Ujjatekindit_EJRadioButton_Change"></ej:RadioButton>

In the page rendering, the complier create the radiobutton with this code, not in my js file: ( from the page source )
$("#ContentPlaceHolder1_Ujjatekindit_EJRadioButton").ejRadioButton(.....

How could I check is the Jquery is exist in there with RequireJS?



Regards,
 Imre

Berly Christopher [Syncfusion]
Replied On September 14, 2017 06:29 AM

Hi Imre, 
 
Thanks for contacting Syncfusion support. 
 
We have checked with your query. We were able to reproduce the reported query (“I want to use RequireJS and have problem with jQuery load checking when the page renders the radiobuttons.”).  
 
We would like to let you know that we don’t have requireJS support for ASP.NET web form controls. So, we suggest to use below code in your application to render the Syncfusion controls with requireJS. 
Default.aspx: 
   <input type="radio" id="radioButton" name="radio" /> 
 
      <script type="text/javascript"> 
          require.config({ 
              paths: { 
 
                  "jquery": 'Scripts/jquery-3.1.1.min', 
 
                  "jsrender": 'Scripts/jsrender.min', 
 
              } 
          }); 
          require(["Scripts/ej/web/ej.radiobutton.min"], function () { 
              $("#radioButton").ejRadioButton({ 
                  text:"Fresher" 
              }); 
          }); 
        </script> 
 
We have prepared the sample based on requireJS with JavaScript. Please get the sample from the below location. 
 
  
To know more about requireJS please refer the below Documentation link. 
 
 
Regards, 
Berly B.C 


Imre Revesz
Replied On September 14, 2017 07:31 AM

Dear Berly B.C,


Thanks for the reply, I will change my code to that you written.



Regards, 

 Imre


Berly Christopher [Syncfusion]
Replied On September 15, 2017 08:37 AM

Hi Imre, 
 
Thanks for the update. Please get back to us if you need any further assistance on this.  
 
Regards, 
Berly B.C 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

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.

;