dear freinds... i have made a c# web application aned it is working properly in my computer... when i published it in the internet, it doesnt work as it should???!!!
in one page i must fill a page dynamically from sql tabel and it does. but each items has a linkbutton, that when you press on it, it should open a page with controls from a sql tabel, but the page is not opened and the current page becomes empty???!!!
my codes are as follow:
protected void FillPage(int rowind)
{ ...... LinkButton adtitle = new LinkButton();
adtitle.Text = "Title:" + rowind.ToString() + ":" + GridView1.Rows[rowind].Cells[4].Text;
title[rowind] = GridView1.Rows[rowind].Cells[4].Text;
tcell_3.Controls.Add(adtitle);
trow_3.Controls.Add(tcell_3);
mytable.Controls.Add(trow_3);
adtitle.Click += new EventHandler(adtitle_Click);
this.form2.Controls.Add(adtitle);
.....}
private void adtitle_Click(object sender, EventArgs e)
{
//LinkButton adtitle = sender as LinkButton;
LinkButton adtitle = (LinkButton)sender;
var s = adtitle.Text.Split(':');
int nn = Convert.ToInt32(s[1]);
visitors[nn] = m[nn];
Session["nr"] = nr[nn];
Session["name"] = "";
Session["email"] = Email[nn];
Session["title"] = title[nn];
Session["message"] = "Ad registered!";
Session["visitors"] = visitors[nn].ToString();
Server.Transfer("adpage.aspx");
}
it works on my computer, but not in the internet???!!!
i cannot put the codes in the Page_Load... i appreciate any help, greateful with complete codes... kind regards