本文介绍了如何验证& nbsp;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在gridview中如下
In gridview as follows
Compid Companyname Address
Select 1 trom
Gridview选择的索引更改代码如下
Gridviewselected index change code as follows
protected void gvcomdet_SelectedIndexChanged(object sender, EventArgs e)
{
txt_compid.text = gvcomdet.SelectedRow.Cells[1].text.tostring();
txt_name.text = gvcomdet.SelectedRow.Cells[2].text.tostring();
txt_address.text = gvcomdet.SelectedRow.cells[3].text.tostring()
}
当我在文本框中选择gridview gridview时,所选行将显示如下
When i click the select in gridview in textbox gridview selected row will be displayed as follows
Compid 1 (txt_compid)
Companyname trom (txt_name)
Address <code>" "</code>
在地址文本框中,txt_address显示
i想要验证
不应该显示在 txt_address
文本框中,它将被替换为空值
我怎样才能在asp.net中使用c#验证。
In address textbox txt_address shows
i want to validate " "
should not be shown in txt_address
textbox it will be replaced with empty value
for that how can i validate in asp.net using c#.
推荐答案
txt_address.text = gvcomdet.SelectedRow.cells[3].Text.Trim();
这篇关于如何验证& nbsp;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!