
Untitled
By: a guest on
May 11th, 2012 | syntax:
None | size: 1.05 KB | hits: 14 | expires: Never
jquery serialize and .net controls
<asp:DropDownList ID="ddFirmaAd" runat="server" Width="180" Height="25">
</asp:DropDownList>
ajaxRequest("AjaxServices/Insert.aspx", $("#aspnetForm").serialize(), $('#returnMessage'), 0, $(this));
function ajaxRequest(pageURL, queryString, putArea, timeout, disabledCtrl) {
if (disabledCtrl != null)
disabledCtrl.attr("disabled", "true");
$.ajax({
async: true,
timeout: timeout,
cache: false,
url: pageURL + "?" + queryString,
alert($("#aspnetForm").find("input,textarea,select,hidden").not("#__VIEWSTATE,#__EVENTVALIDATION").serialize());
string value = request.queryString("ddFirmaAd");
private string GetValueById(string endsWith)
{
var qs = HttpContext.Current.Request.QueryString;
foreach(var key in qs)
{
string skey = key.ToString();
if(skey.EndsWith(endsWith))
{
return qs[skey];
}
}
return string.Empty;
}