quinnipiac0807
Programmer
I'm trying to pass a variable from one page to another and I"m getting the input string in correct format error. I usually can work arround this error but this time I can't. Here's the code.
protected void grdAssets_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
AssCustID = e.Item.Cells[6].ToString();
if (e.Item.FindControl("btnDelAssign") != null)
((ImageButton) e.Item.FindControl("btnDelAssign")).Attributes.Add("onclick", "showModal('itd/itdDeleteAssignment.aspx?acID=" + AssCustID + "', 'Delete Assignment', '', 'status:no;scroll:no;', 250, 450, false)");
}
The code on the next page to recieve it is next.
private void btnOk_Click(object sender, System.EventArgs e)
{
DeleteAsset(Convert.ToInt32(AssCustID));
}
I get the error when I try to convert it to an int32. Any suggestions. Thanks again!!!
protected void grdAssets_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
AssCustID = e.Item.Cells[6].ToString();
if (e.Item.FindControl("btnDelAssign") != null)
((ImageButton) e.Item.FindControl("btnDelAssign")).Attributes.Add("onclick", "showModal('itd/itdDeleteAssignment.aspx?acID=" + AssCustID + "', 'Delete Assignment', '', 'status:no;scroll:no;', 250, 450, false)");
}
The code on the next page to recieve it is next.
private void btnOk_Click(object sender, System.EventArgs e)
{
DeleteAsset(Convert.ToInt32(AssCustID));
}
I get the error when I try to convert it to an int32. Any suggestions. Thanks again!!!