how can i access a hidden field value in Action methods parameter please refer following code
Url.Action("action","controller",new {para_name=hidden_field_value})
how can i access a hidden field value in Action methods parameter please refer following code
Url.Action("action","controller",new {para_name=hidden_field_value})
Edit
Your code in the comment only assigns the value "country" to ViewBag.Country, which means it will not work.
again your only solution is to use the following
var url = '@Url.Action("action", "controller")?country=' + Ext.getCmp("CmbCountry").value
you say
i want to assign this value as a parameter to the Action Above and dont want to send it as a query-string parameter
but that's exactly what the Url.Action
method do, if you observe the result of the Url.Action
method you will see that it is one and the same
got the solution, first set the value to hidden field inside above getCmbCountry()
function
and then sent this hidden field value as a EXT.NET StoreParameter
as below
.Params(new StoreParameter { Name="countryCode", Value="App.hdnCountry.getValue()", Mode=ParameterMode.Raw})