以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助]RadioButton1控件取标题赋值  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=102410)

--  作者:13865161910
--  发布时间:2017/6/19 14:11:00
--  [求助]RadioButton1控件取标题赋值
添加了两个RadioButtion1,RadioButtion2
用于设计注册窗口时,选择客户代理的品牌,再根据注册时选择的radiobuttion控件标题获值,将其赋值写入数据库

请教该代码如何写?
sql server数据库,字段名:[代理品牌]
dim zh as string = e.Form.Controls("文本控件标题名").Value
’后续代码
cmd.CommandText = “”insert into {数据表名} ([账号],[代理品牌],....) Values(‘“ & zh & ”’,代理品牌这个如何写?,....)
’后续代码
[此贴子已经被作者于2017/6/19 14:19:22编辑过]

--  作者:有点色
--  发布时间:2017/6/19 15:11:00
--  

 Dim r1 = e.Form.Controls("RadioButtion1")

 Dim r2 = e.Form.Controls("RadioButtion2")

 Dim str As String = iif(r1.checked, r1.text, r2.text)

 msgbox(str)