how to create dynamic link
-
hi all i want to know how to create dynamic links/urls like.. http://www.abc.com/demo/server01/Tab.asp?Tab=2&PROJECT\_ID=75" i want to know how to create the urls from.. "tab.asp?tab=2&project_id=75 " how to create these id values automatically and how to access them when i want to hyperlink them to another page... for ex: i have table like: name profession skills -------------------------------------- pradip software .net john telecom cdma ... .... ..... i want to make my each entry of name,profession,skills to be hyperlinked so that when ever i will click on any item...it will generate a link like the above mentioned and accordingly navigate to the detailed page... its urgent..please help me.. thanks in advance..
pradip kishore
-
hi all i want to know how to create dynamic links/urls like.. http://www.abc.com/demo/server01/Tab.asp?Tab=2&PROJECT\_ID=75" i want to know how to create the urls from.. "tab.asp?tab=2&project_id=75 " how to create these id values automatically and how to access them when i want to hyperlink them to another page... for ex: i have table like: name profession skills -------------------------------------- pradip software .net john telecom cdma ... .... ..... i want to make my each entry of name,profession,skills to be hyperlinked so that when ever i will click on any item...it will generate a link like the above mentioned and accordingly navigate to the detailed page... its urgent..please help me.. thanks in advance..
pradip kishore
Follow following steps. 1-Create a Datagrid and place a template column where you want to palce the hyperlink to appear. Eg:
<asp:TemplateColumn HeaderText="Details">
<ItemTemplate>
<a href=http://url+?id='<%# DataBinder.Eval(Container.DataItem, "project_id")
%>'>Details</a>
</ItemTemplate>
</asp:TemplateColumn>2: Load the values from database to a data table of data reader and bind it to Datagrid. 3: In the recieving page get the id from query string and fetch details from the database on basis of that id. Note: you need to create the correct hyperlink in the ItemTemplate column, here i have created just a dummy link. Regards Prakash
-
hi all i want to know how to create dynamic links/urls like.. http://www.abc.com/demo/server01/Tab.asp?Tab=2&PROJECT\_ID=75" i want to know how to create the urls from.. "tab.asp?tab=2&project_id=75 " how to create these id values automatically and how to access them when i want to hyperlink them to another page... for ex: i have table like: name profession skills -------------------------------------- pradip software .net john telecom cdma ... .... ..... i want to make my each entry of name,profession,skills to be hyperlinked so that when ever i will click on any item...it will generate a link like the above mentioned and accordingly navigate to the detailed page... its urgent..please help me.. thanks in advance..
pradip kishore
when you are providing the target url for the names generate the dynamic url. lets say you got all the data frm db and have it in a dataset. then it wouldbe targeturl=www.abc.com/....?name"+ds.tables[0]["columnname"]......
Gautham
-
when you are providing the target url for the names generate the dynamic url. lets say you got all the data frm db and have it in a dataset. then it wouldbe targeturl=www.abc.com/....?name"+ds.tables[0]["columnname"]......
Gautham
What would happen if some special characters are stored in the database ? ( for example "&" which is used in query strings )
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
-
What would happen if some special characters are stored in the database ? ( for example "&" which is used in query strings )
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
-
Good question, never came across that! Make sure that your database doesnt have any specila characters, kidding! May be we have o filter the value again at the front end??? You know the answer?
Gautham
when inserting data into database always HtmlEncode it first. When displaying the data on forms HtmlDecode it.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder