开发者

In a radio button, does the name or id get posted back?

开发者 https://www.devze.com 2023-02-14 22:20 出处:网络
My radio buttons are like this, there are 2 and whichever the person selects I want to get when the form posts.

My radio buttons are like this, there are 2 and whichever the person selects I want to get when the form posts.

A <input type="radio" name="开发者_如何转开发userType" id="a" />

B <input type="radio" name="userType" id="b" />

So I want to do:

Request["userType"]

and get 'a' or 'b'

But I am getting 'on' returned from Request["userType"]


Try giving each radio button a value

<input type="radio" name="userType" id="a" value="a" />

<input type="radio" name="userType" id="b" value="b" />
0

精彩评论

暂无评论...
验证码 换一张
取 消