Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
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
Updated 6-Feb-11 19:28pm
v2
Comments
TweakBird 7-Feb-11 1:29am    
Please use <pre> tag only for code blocks. not for text.

1 solution

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")%>'>
 
Share this answer
 
v2

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900