开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜