I'm trying to bring over the IDs of the input elements "submit" and "skip" and do some logic based on which button was pushed. It doesn't appear to be coming over in the Request object. How can I do this???
<div id="modal">
<% using (Ajax.BeginForm("Promo", new AjaxOptions { UpdateTargetId = "modal" }))
{ %>
<div id="modal_inner">
<div style="clear: both;">
<%= Html.TextBox("Data1")%>
<input name="submitBtn" id="submitBtn" type="image" src="button_submit.gif" width="74" alt="Submit" />
<input name="skipBtn" id="skipBtn" type="image" src="button_skip.gif" alt="Skip" />
<br />
</div>
</div>
<% } %>
</div>
public JavaScriptResult Promo(string Data1)
{
string submitBtn = Request.Params["submitBtn"];
string skipBtn = Request.Params["skipBtn"];
if (skipBtn != null)
{
Session["Data1"] = "Default";
return JavaScript("window.top.location.href ='" + Url.Action("Index", "Lead") + "';");
}
if (submitBtn != null && IsValidCode(Data1))
{
Session["Data1"] = Data1;
return JavaScript("window.top.location.href ='" + Url.Action("Index", "Lead") + "';");
}
Session["Data1"] = "Default";
return JavaScript("$('TB_window').dispose(); TB_show('', '#TB_inline?&width=344&height=294&inlineId=modal', '::::');");
}