Beginform is not working in Asp.net mvc control whenI am trying to send the values

Posted by kumar on Stack Overflow See other posts from Stack Overflow or by kumar
Published on 2010-06-03T21:28:30Z Indexed on 2010/06/03 21:34 UTC
Read the original article Hit count: 293

Filed under:
|

Hello friends i have a beginform is soemthing like this,

<% using (Html.BeginForm("edit", 
    (Model.ExceptionCategoryID == "EXP") ? "expense" : "pricing", FormMethod.Post,
    new { @id="exc-" + Model.ExceptionID})) 
   { %>
   <input type="hidden" id="Status" runat="server"/>
<%= Html.ValidationSummary(true)%>

input submit button

 <input id="bSubmit" type="submit" class="button" value="Save" />

<script type="text/javascript">
    $(document).ready(function() {

       $('#bSubmit').click(function() {
            var Status = "<%=Model.ExceptionStatus.Trim()%>";
            alert(Status);
            $('#1_Status').attr('value',Status);
        });
</script>

on sbmit I am trying to send the Status value.. on controler

var sta = Request.Form[0];

I am getting something like 3%24Status in the From key..

why its hapeening ?

thanks

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about asp.net-mvc