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.

Menu / Through Model. How I can pass parameters to client side onclick function?

Thread ID:

Created:

Updated:

Platform:

Replies:

105318 Sep 28,2012 02:10 PM Oct 23,2012 01:58 AM ASP.NET MVC (Classic) 3
loading
Tags: Tools
German
Asked On September 28, 2012 02:10 PM

How I can send parameters to client side OnClick function, to rediret to controller with parameters. 

  

Meena [Syncfusion]
Replied On October 3, 2012 06:55 AM

Hi German,

 

Thanks for contacting Syncfusion forums.

 

You requirement of calling ClientSideOnClick event of Menu through model (i.e from controller) can be done as follows,

 

<code>

[Controller]

public ActionResult Index()

{

MenuModel model = new MenuModel();

model.ClientSideOnClick = "OnClick";

return View(model);

}

</code>

 

The above code will trigger the ClientSideOnClick event on clicking the menu items,

 

<code>

<script type="text/javascript">

    function OnClick(sender, args) {

    }

</script>

</code>

 

Here an object for the control will be created and we can obtain the object and all other details of the control through sender and args parameter. So, could you please let us know your requirement of passing parameters to OnClick event in detail? What type of parameters would you like to pass? Kindly let us know your requirement in detail, so that we can proceed further.

 

Please let us know if you have any other concerns.

 

Regards,

Meena


German
Replied On October 22, 2012 01:28 PM


Meena [Syncfusion]
Replied On October 23, 2012 01:58 AM


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.

;