Z
zp
Hi there,
Have a web page with SqlDataSource and GridView (.NET 2) that gets and
displays data from database. The connection to the database is opened on page
load and the grid is populated. I have no problem at all on my testing
machine, IIS5 or VS development server, but when I deploy it on a remote
server (win2003, IIS6) and the page is displayed the data not showing in the
grid all the time. Some times I have to click several times back and forth in
order the grid to be populated with data. This is the code I use on page load
event:
protected void Page_Load(object sender, EventArgs e)
{
try
{
string LClassTutor;
LClassTutor = (String)Session["UserId"];
Parameter Parameter1 = new Parameter();
Parameter1.Name = "@CR";
Parameter1.Type = TypeCode.String;
Parameter1.DefaultValue = LClassTutor;
DsStdOnClass.SelectParameters.Add(Parameter1);
GvStudents.DataBind();
}
catch
{
Session["ERROR"] = "Parameters definition";
Server.Transfer("Error.aspx", true);
}
}
Have tried many variation of the above code but the problem persists. Any
suggestion where to look for possible solution?
Thanks
zp
Have a web page with SqlDataSource and GridView (.NET 2) that gets and
displays data from database. The connection to the database is opened on page
load and the grid is populated. I have no problem at all on my testing
machine, IIS5 or VS development server, but when I deploy it on a remote
server (win2003, IIS6) and the page is displayed the data not showing in the
grid all the time. Some times I have to click several times back and forth in
order the grid to be populated with data. This is the code I use on page load
event:
protected void Page_Load(object sender, EventArgs e)
{
try
{
string LClassTutor;
LClassTutor = (String)Session["UserId"];
Parameter Parameter1 = new Parameter();
Parameter1.Name = "@CR";
Parameter1.Type = TypeCode.String;
Parameter1.DefaultValue = LClassTutor;
DsStdOnClass.SelectParameters.Add(Parameter1);
GvStudents.DataBind();
}
catch
{
Session["ERROR"] = "Parameters definition";
Server.Transfer("Error.aspx", true);
}
}
Have tried many variation of the above code but the problem persists. Any
suggestion where to look for possible solution?
Thanks
zp