Bind your querystring value to CommandArgument property of Button control. Find the value inside
DataList1_ItemCommand
event of DataList Control, and redirect the page from here.
protected void DataList1_ItemCommand(object source,
DataListCommandEventArgs e)
{
Button btn = source as Button;
if (btn != null && convert.toString(btn.CommandArgument) != string.empty)
{
response.redirect("Defaut2.aspx?UserId="+btn.CommandArgument.toString())
}
}
follow the link to learn more..
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.datalist.itemcommand(v=VS.100).aspx
Anil Pandya :)