Link to Button

How do i add a link to the button to redirect from one action to other

3 Replies

DL Deepa Loganathan Syncfusion Team February 3, 2017 06:35 PM UTC

Hi Vengatramanan,  
Thanks for contacting Syncfusion support.  
You could redirect from one action to another by using the button click event as give below. 
 
<ej-button id="btn_rel='nofollow' href" text="Click to redirect" click="redirect" /> 
 
<script> 
    function redirect() { 
        // Redirect to action  
        window.location.rel='nofollow' href = '@Url.Action("processForm")' ; 
    } 
</script> 
 

Please get back us if you need any further assistance.  
Regards,  
Deepa L. 



VE Vengatramanan replied to Deepa Loganathan February 4, 2017 09:42 AM UTC

Hi Vengatramanan,  
Thanks for contacting Syncfusion support.  
You could redirect from one action to another by using the button click event as give below. 
 
<ej-button id="btn_rel='nofollow' href" text="Click to redirect" click="redirect" /> 
 
<script> 
    function redirect() { 
        // Redirect to action  
        window.location.rel='nofollow' href = '@Url.Action("processForm")' ; 
    } 
</script> 
 

Please get back us if you need any further assistance.  
Regards,  
Deepa L. 


But will it work without calling the method like this.
 

<ej-button id="btn_rel='nofollow' href" text="Click to redirect" click="window.location.rel='nofollow' href = '@Url.Action("processForm")' " /> 

Thanks,
Vengat


FP Francis Paul Antony Raj Syncfusion Team February 6, 2017 02:47 PM UTC

Hi Vengatramanan, 
 
In our ASP.NET Core Tag Helper, we have not provided the support to define the events at Tag Helper inline. So, please achieve your requirement by defining a function for EJ events at client-side script section as mentioned in our previous code example. 
 
Regards, 
Francis Paul A. 


Loader.
Up arrow icon