I've been working on the local development server that comes with Visual Web Developer and have the following code working properly.
However, when I move to IIS and load the page, I don't get any error messages but newsID is blank!
protected void GridView1_RowCommand(object sender, System.Web.UI.WebControls.GridViewCommandEventArgs e)
string currentCommand = e.CommandName;
int currentRowIndex = Convert.ToInt32(e.CommandArgument);
string newsID = gv.DataKeys[currentRowIndex].Value.ToString();
Response.Write("NewsID = " + newsID);