can i use following code without gridview_rowdatabound event? how and where?
protected void GridView2_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
string hotelname = e.Row.Cells[4].Text;
string roomtype = e.Row.Cells[5].Text;
string AminID = e.Row.Cells[10].Text;
string Aminitiesval = " ";
Aminitiesval = Aminitiesval + "<a href='Amenities.aspx?Aids=" + AminID + "&HotelName=" + hotelname + "&RoomType=" + roomtype + "'>" + AminID + "</a>" + ",";
e.Row.Cells[10].Text = Aminitiesval;
}
}