tags:

views:

16

answers:

0

how do i append or get variable to server side function from MVC application after HttpVerbs.Post?

in client side code:

<input type="hidden" id="hidPopUpMsg" name="hidPopUpMsg" class="hidPopUpMsg" value="" />

<% Using Html.BeginForm("SelectedProvider", "Scheduling", New With {item.PRVNO, .PhoneNumber = item.PPHON, .FaxNumber = item.PPFAX, .SteerageFlag = item.PPSTRF, _
  .EpisodeID = ViewData("EpisodeID"), .EpisodeDate = ViewData("EpisodeDate"), .UserName = Session("UserName"), _
  .Payor = ViewData("PayorList"), .PTYPE = item.PTYPE, .PlanType = ViewData("PlanType"), .CompanyID = ViewData("CompanyID")}, FormMethod.Post, New With {.class = "SelectProviderForm"})%>
    <input type="submit" value="Select" id="<%=Html.Encode(item.PRVNO)%>" />
<%End Using%>

Javascript.js

document.getElementById('hidPopUpMsg').value = "N";

<AcceptVerbs(HttpVerbs.Post)> _
Function SelectedProvider(ByVal PRVNO As String, ByVal PhoneNumber As String, ByVal FaxNumber As String, _
                          ByVal SteerageFlag As String, ByVal EpisodeID As String, ByVal EpisodeDate As Nullable(Of DateTime), _
                          ByVal UserName As String, ByVal hidPopUpMsg As String)


End Function

The problem is that hidPopUpMsg variable was nothing. How can I read this from the page? Since hidPopUpMsg value was set after Javascript post? Anyway I can append parameter from post?