hello you all,

thanks you all for solving my problems and helping and guiding me.

i have news titles with hyperlink in one page when i click on one of the news title then it will navigate to other page and will display news title and content there.

now i have passed session news_id to content dipslaying page in repeater.

<td><asp:HyperLink ID="HyperLink1" navigateurl='<%# String.Format("Default.aspx?News_Id={0}", Eval("News_Id")) %>' runat="server"><%#DataBinder.Eval(Container.DataItem,"News_Title") %></asp:HyperLink></td>

how can i receive news_title and News_content on other.

i have to fetch news_content from database and i m using asp.net2.0.

Recommended Answers

All 4 Replies

hello you all,

thanks you all for solving my problems and helping and guiding me.

i have news titles with hyperlink in one page when i click on one of the news title then it will navigate to other page and will display news title and content there.

now i have passed session news_id to content dipslaying page in repeater.

<td><asp:HyperLink ID="HyperLink1" navigateurl='<%# String.Format("Default.aspx?News_Id={0}", Eval("News_Id")) %>' runat="server"><%#DataBinder.Eval(Container.DataItem,"News_Title") %></asp:HyperLink></td>

how can i receive news_title and News_content on other.

i have to fetch news_content from database and i m using asp.net2.0.

hi,

As of your code u r passing the News_id value using querystring. You can get the value on the other page using

Request.QueryString["New_id"];

But, u also need to get the value of "News_Title" too. Here, u have to pass the same through querystring.

But, the better way to go is Session.

Assign the required values to session as follows.

Session["News_id"]=News_id;
Session["News_title"]=News_title;

i hope this will help u. otherwise let me know.

explain ur case in detail..
wot do u want exactly..and which are the controls u r using to achieve this..!

i know how to use session and request.querystring but passing News_Id using hyperlink is new for me.

problem is that

when i pass News_Id using hyperlink from news.aspx it will navigate to news1.aspx page and there in repeater it will show the News_Title and News_content from database.
i have no idea how to do this??

please guide me about this idea

>news1.aspx page and there in repeater it will show the News_Title and News_content

Write code in Page_load handler that fetch rows from the table based upon given news_id.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.