string totPaymentVar = Request.Form["컨트롤아이디"];
form에 action값 지정. input type="submit".
<form id="form1" runat="server" method="post" action="order_step2.aspx">
<input type="submit" value="다음단계로 이동"/>
<input type="submit" value="다음단계로 이동"/>
자바스크립트에서 submit.
버튼을 클릭하면 자바스크립트 함수를 호출한다.
<input type="button" value="다음단계로 이동" onclick="javascript:sendform();"/>
function sendform() {
var obj = document.form 아이디;
obj.action.value = "이동 할 페이지";
obj.submit();
}
or
<asp:Button ID="BtnNextStep" runat="server" Text="다음단계로 이동" OnClientClick="return sendform();" />
function sendform() {
document.getElementById("<% = form 아이디.ClientID %>").action = "이동 할 페이지";
document.getElementById("<% = form 아이디.ClientID %>").submit();
}
function sendform() {
document.getElementById("<% = form 아이디.ClientID %>").action = "이동 할 페이지";
document.getElementById("<% = form 아이디.ClientID %>").submit();
}
'ASP.NET' 카테고리의 다른 글
asp.net- 숫자 자릿수 콤마찍기 (0) | 2011.04.07 |
---|---|
MasterPage + 이전 Form값 사용하기(페이지간게시) (0) | 2011.04.06 |
자바스크립트_ xmlRequest (0) | 2011.03.17 |
ASP.NET_ 한글 Encoding (0) | 2011.03.16 |
배열_ 1차원배열 & 다차원배열 (0) | 2011.03.15 |