如何提交主表格? [英] How to submit the master form?

查看:85
本文介绍了如何提交主表格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在母版页上有一个超链接,当用户使用超链接提交表单时,我想要它,即在超链接中传递内容ID,并且在提交表单时,相应content_id的内容将显示在内容占位符中. />
我该怎么做呢?我可以用Java语言吗?如果是的话,请帮帮我.

谢谢.

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.

推荐答案

您可以使用Javascript,我认为这是ASP形式(runat = server).

大多数ASP控件在实际页面上都呈现为html控件,因此要使用javascript获取对象,请使用objectid.ClientID

例子

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>



通过javascript和ASP提交此表单



to submit this form through javascript and ASP

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



希望对您有帮助



Hope this helps


这篇关于如何提交主表格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆