.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

Asp.net gridview

Posted By: shiv     Posted Date: March 03, 2011    Points:2   Category :ASP.Net
hi

hi i have gridview it contain forum topic .
when i click forum topic it open next page with same forum topic name with detalis.

Responses
Author: kamlesh             
Posted Date: March 03, 2011     Points: 20   

use on click event
response.redirect("default.aspx");

with session

Thanks And Regards.
Kamlesh Nikam
Author: Sunil Yadav       [Moderator]      
Posted Date: March 03, 2011     Points: 20   

Hi,

You can pass the forum id in querystring and retrieve the forum details on details page instead of keeping it in session.

Create a Template field and add a Linkbutton in the item template.

<asp:SPGridView runat="server" ID="gvQuestions" AutoGenerateColumns="false"
AllowPaging="true">
<Columns>
<asp:TemplateField HeaderText="ID">
<ItemTemplate>
<asp:LinkButton ID="lnkname" runat="server"
Text='<%#Eval("ID") %>'
PostBackUrl='<%#"~/forum.aspx?ID="+Eval("ID") %>'>
</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>


Hope this helps.

Author: Maverick             
Posted Date: March 04, 2011     Points: 20   

Use Pstbackurl property in ur <itemtemplate> tag.
postbackurl='<%#~/urpage.aspx?eval("ID")%>'

Hope it helps

Thanks,
Maverick



Thanks,
Maverick
Author: Karthikeyan Anbarasan       [Moderator]      
Posted Date: March 04, 2011     Points: 20   

Hi Shiv,

Please post ur requirement in brief?

Thanks
Karthik
http://www.f5debug.net
Mark as Answer if the answer solves your issue!!!


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend