Click here to Skip to main content
15,892,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi ,

I have a hyperlink on the masterpage and I want it when the user submits the form using the hyperlink that the content id is passed in the hyperlink and on submitting the form the the content of respective content_id will show in the content place holder.

How do I do this? Can I do this with Javascript? If yes, then please help me.

Thank you.
Posted
Updated 18-Feb-11 0:17am
v3
Comments
R. Giskard Reventlov 18-Feb-11 6:32am    
What have you already tried? Is this a simple html element or an asp:HyperLink control?
Sreejith Gopinathan 18-Feb-11 17:23pm    
Please improve your question by adding relevant code block
anupama962010 19-Feb-11 0:45am    
please Post your question more clearly by mentioning what u have tried already

1 solution

You can use Javascript, I assume that this is an ASP form (runat=server).

Most ASP controls are rendered as html controls on the actual page so to get the object through javascript you use objectid.ClientID

Example

<html> 

<head> 
<title>Example Page</title>
</head>

<body>
<form id="myForm" runat="server">

</form>
</body>

</html>


to submit this form through javascript and ASP

<script type="text/javascript">
document.forms['<%=myForm.ClientID%>'].submit();
</script>


Hope this helps
 
Share this answer
 

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