我需要將用戶輸入的html用戶名,電子郵件和密碼以html形式(在index.aspx中)輸入,並在另一個asp.net代碼中使用它(名爲'u'的文件夾中的register.aspx)。Request.QueryString不會從html表單獲取輸入名稱
這是形式:
<form action="u/register.aspx" method="post" id="regForm">
<input type="text" name="fname" id="fname" placeholder="Full Name (Optional)" maxlength="16" />
<input type="text" name="uname" id="uname" placeholder="Username" maxlength="16" />
<input type="email" name="email" id="email" placeholder="Email Address" maxlength="32" />
<input type="password" name="pwd" id="pwd" placeholder="Password" maxlength="16" />
<input type="password" name="repwd" id="repwd" placeholder="Repeat Password" maxlength="16" />
<input type="submit" value="Sign Up" id="signup" />
</form>
但是,當我使用的Request.QueryString [「FNAME」]例如,它並不需要「FNAME」從形式上,它只是需要空值。
我能做些什麼來解決這個問題?有沒有不同的方法可以用來實現想要的結果?
非常感謝!
'QueryString'會從查詢字符串足夠令人驚訝的信息。你已經發布了你的表單,你需要'request.Form' – paqogomez