Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET SQL-Server
Hi,
I am making a forum and want that admin can create a link for the forum home page and user can ask question by clicking this link and comment on the questions or answers. When admin create the link then it is show on the forum home page and how to open that link.. So that user can click and open the question of that link how to add control to that link so that it open the respective question. I think this is done by adding a auto id value with link which admin and then how to call that link using auto generated id value..
 
Thank you.
[Edit] REMOVED PRE TAG & MAIL ID [/Edit]
Posted 6-Feb-11 20:19pm
Edited 6-Feb-11 20:28pm
TweakBird17.1K
v2
Comments
E$w@r at 7-Feb-11 1:29am
   
Please use <pre> tag only for code blocks. not for text.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

As far I understood you want to find the ID of the dynamically created link. If so you may add a LinkButton Control and use its CommandArgument property to assign the ID.
 
When Link is clicked, at server side you may get the corresponding ID of the link.
 
<asp:linkbutton id="lnkBtn" runat="server" commandname="QuestionClick" commandargument='<%# Bind("ID")%>'>
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 299
1 Maciej Los 295
2 Sergey Alexandrovich Kryukov 205
3 Aajmot Sk 202
4 Sinisa Hajnal 166
0 OriginalGriff 7,760
1 Sergey Alexandrovich Kryukov 7,072
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,785


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 9 Feb 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100