Hi,
I need some help with query string,
I load data with enitity framework from mssql database, and all things are succesfully loaded, but... I have some probably stu*id problem, when i try to set "href" i 've problem with query string, string into adress bar is duplicated when i click on some <a href>data</a> from database,
Example:
when i click on first data:
Default.aspx/?show=1
on second
Default.aspx/Default.aspx/show=2
code:
Kategorije(Serbian) == Categories(English)
I was try to clear query string but still same problem...
In php i used this line of code normally:
but in ASP.NET that does not work...
I need some help with query string,
I load data with enitity framework from mssql database, and all things are succesfully loaded, but... I have some probably stu*id problem, when i try to set "href" i 've problem with query string, string into adress bar is duplicated when i click on some <a href>data</a> from database,
Example:
when i click on first data:
Default.aspx/?show=1
on second
Default.aspx/Default.aspx/show=2
code:
Kategorije(Serbian) == Categories(English)
if (!IsPostBack) { string output = ""; DatabaseEntities de = new DatabaseEntities(); var rez = from p in de.Kategorijes select p; foreach (Kategorije k in rez) { output += String.Format("<a href='Default.aspx/?show={0}'>{1}</a></br>", k.Kategorije_Id.ToString(), k.Naziv_Kategorije); } Response.Write(output); }
I was try to clear query string but still same problem...
In php i used this line of code normally:
$output .= '<li><a href="category.php?show='.$row['id'].'">'.$row['name'].'</a> ('.$check.')</li>';
but in ASP.NET that does not work...