they all right,but....,i think not your need. you can use input type=button,and use its event serverchange(write mybe like this),and write function in file .cs,then can do want your say.
js可以通过web service调用服务端方法,前提到ms下在webservice.htc文件
自己看吧:
Dim sCmd as string sCmd=Page.GetPostBackClientHyperlink(btnUpdate, "") If not page.isPostback then Dropdownlist1.Attributes.add("onchange","ConfirmUpdate("""&sCmd&""")") End ifConfirmUpdate函数如下 <Script language=”javascript”> function ConfirmUpdate(cmd){ if confirm(“Are you sure to update?”) eval(cmd); } </Script>
在xmlsdk上有xmlhttp的详细说明~
要调用其它的函数就要用Web Service了。
http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/Q_20673780.html
http://chs.gotdotnet.com/quickstart/aspplus/
you can use input type=button,and use its event serverchange(write mybe like this),and write function in file .cs,then can do want your say.
Dim sCmd as string
sCmd=Page.GetPostBackClientHyperlink(btnUpdate, "")
If not page.isPostback then
Dropdownlist1.Attributes.add("onchange","ConfirmUpdate("""&sCmd&""")")
End ifConfirmUpdate函数如下
<Script language=”javascript”>
function ConfirmUpdate(cmd){
if confirm(“Are you sure to update?”)
eval(cmd);
}
</Script>
uncj.net
uncj.net
论坛的问题解答\一个发布服务器时间的例子.rar
document.form1.button.click();
function CreateDir()
{
.......
__doPostBack('CreateDir', '');//注意,第一个参数必须是控件的ID
}<a href="javascript:CreateDir();">test</a>
<asp:LinkButton ID="CreateDir" runat="server" OnClick="CreateDir_Click" />