we are using switch in my code on onrowdatabound but it is working fine from source code but when i use with IIS then it show below error
"
Error: An unhandled exception of type 'System.StackOverflowException' occurred in mscorlib.dll
"
I try to increse size of w3wp.exe but system not allow to increse
it show
c:\windows\system32\inetsrv\’ is denied
What I have tried:
try
{
LinkButton lbSelect = (LinkButton)e.Row.FindControl("lbtnUOM");
string stri = Request["ShowDetails"];
switch (stri)
{
case "PRNumber": lbSelect.Attributes.Add("onclick", "return HelpWhGrid('" + lbSelect.Text.ToString().Trim() + "','" + hdnID.Value + "')");
break;
case "ProductionPPCNo": lbSelect.Attributes.Add("onclick", "return HelpVendorCode('" + lbSelect.Text.ToString().Trim() + "','" + hdnID.Value + "','" + e.Row.Cells[1].Text.ToString() + "', '" + hdnID2.Value + "')");
break;
case "ProductionCustomer": lbSelect.Attributes.Add("onclick", "return HelpVendorCode('" + lbSelect.Text.ToString().Trim() + "','" + hdnID.Value + "','" + e.Row.Cells[1].Text.ToString() + "', '" + hdnID2.Value + "')");
break;
case "ProductionFromSo": lbSelect.Attributes.Add("onclick", "return HelpWhGrid('" + lbSelect.Text.ToString().Trim() + "','" + hdnID.Value + "')");
break;
case "ProductionToSo": lbSelect.Attributes.Add("onclick", "return HelpWhGrid('" + lbSelect.Text.ToString().Trim() + "','" + hdnID.Value + "')");
break;
case "STATranNo": lbSelect.Attributes.Add("onclick", "return HelpWhGrid('" + lbSelect.Text.ToString().Trim() + "','" + hdnID.Value + "')");
break;
case "STAUserId": lbSelect.Attributes.Add("onclick", "return HelpRemarkGrid('" + lbSelect.Text.ToString().Trim() + "','" + hdnID.Value + "','" + e.Row.Cells[1].Text.ToString().Trim() + "','" + hdnID2.Value + "')");
break;
case "SPNo": lbSelect.Attributes.Add("onclick", "return HelpWhGrid('" + lbSelect.Text.ToString().Trim() + "','" + hdnID.Value + "')");
break;
case "GroupCodeList": lbSelect.Attributes.Add("onclick", "return HelpWhGrid('" + lbSelect.Text.ToString().Trim() + "','" + hdnID.Value + "')");
break;
case "SPItemCodeList": lbSelect.Attributes.Add("onclick", "return HelpWhGrid('" + lbSelect.Text.ToString().Trim() + "','" + hdnID.Value + "')");
break;
case "SPCustomerCode": lbSelect.Attributes.Add("onclick", "return HelpWhGrid('" + lbSelect.Text.ToString().Trim() + "','" + hdnID.Value + "')");
break;
case "CustomerGroup": lbSelect.Attributes.Add("onclick", "return HelpWhGrid('" + lbSelect.Text.ToString().Trim() + "','" + hdnID.Value + "')");
break;
case "ItemDiscount": lbSelect.Attributes.Add("onclick", "return HelpWhGrid('" + lbSelect.Text.ToString().Trim() + "','" + hdnID.Value + "')");
break;
case "CustomerCodeReciept": lbSelect.Attributes.Add("onclick", "return HelpCostCenterWindow('" + lbSelect.Text.Trim() + "','" + hdnID.Value + "')");
break;
case "RECIEPT_PROCESS": lbSelect.Attributes.Add("onclick", "return HelpWindowStockTransfer('" + lbSelect.Text.Trim().ToString().Trim() + "','" + hdnID2.Value + "')");
break;
case "NITDocCustomer": lbSelect.Attributes.Add("onclick", "return HelpTo_FromItem('" + lbSelect.Text.Trim().ToString().Trim() + "','" + hdnID.Value + "','" + e.Row.Cells[1].Text.ToString().Trim() + "','" + hdnID2.Value + "')");
break;
case "TR_FROM_RETURN_INVOICE_NO": lbSelect.Attributes.Add("onclick", "return HelpVendorCode('" + lbSelect.Text.ToString().Trim() + "','" + hdnID.Value + "')");
break;
case "TR_TO_RETURN_INVOICE_NO": lbSelect.Attributes.Add("onclick", "return HelpVendorCode('" + lbSelect.Text.ToString().Trim() + "','" + hdnID.Value + "')");
break;
default:
throw new Exception(String.Format("Unknown state: {0}", stri));
break;
}
}
catch (Exception ex)
{
this.RegisterStartupScript("AlertMsg", genUOM.strScr1 + ex.Message.Replace("'", "") + genUOM.strScr2);
}