一个页面,有很多字段,这个修改写程序好麻烦,您们一般如何弄的额

plglenn7 2009-12-29 08:34:24
...全文
90 14 打赏 收藏 转发到动态 举报
写回复
用AI写文章
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
wiki14 2009-12-29
  • 打赏
  • 举报
回复
输入速度慢,
中文可能产生潜在的编码转换问题。
我不赞成在编码时候使用中文,你可以在变量的后面加上中文注释。
wiki14 2009-12-29
  • 打赏
  • 举报
回复
使用中文类名后期维护起来很麻烦。
plglenn8 2009-12-29
  • 打赏
  • 举报
回复
[Quote=引用 11 楼 lcl_data 的回复:]
用中文做类名没影响吗?
[/Quote]
没有
十八道胡同 2009-12-29
  • 打赏
  • 举报
回复
用中文做类名没影响吗?
silentwins 2009-12-29
  • 打赏
  • 举报
回复
那是新建页面,生成代码
十八道胡同 2009-12-29
  • 打赏
  • 举报
回复
这个都是str开头的,就算用正则提取出来 也不好改啊
怎么知道哪个改成那个啊
wuyq11 2009-12-29
  • 打赏
  • 举报
回复
还有codesmith等
plglenn7 2009-12-29
  • 打赏
  • 举报
回复
目前我在试用动软的
wuyq11 2009-12-29
  • 打赏
  • 举报
回复
public void FindControl(Control.ControlCollection ctrl)
{foreach (Control c in ctrl)
{
if (c is TextBox)
{

}
if(c.HasChildren)
FindControl(c);
}
}
silentwins 2009-12-29
  • 打赏
  • 举报
回复
修改的时候不理这些字段不就好了,不是叫你修改字段吧?
plglenn7 2009-12-29
  • 打赏
  • 举报
回复
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using DataAccess;

public partial class Admin_UploadBiz : System.Web.UI.Page
{
public string strName = "";
public string strCategory = "";
public string strTag = "";
public string strIntroduce = "";
public string strMainProject = "";
public string strvip = "";
public string strSpecial = "";
public string strConsumption = "";

public string strAddress = "";
public string strTraffic = "";
public string strBusName = "";
public string strBuildSignature = "";
public string strTel = "";
public string strUrl = "";
public string strEmail = "";
public string strQq = "";
public string strMsn = "";
public string strselAddress = "";

public string strServiceTime = "";
public string strServiceArea = "";
public string strSeatNum = "";
public string strRoom = "";
public string strForHuman = "";
public string strParking = "";
public string strSpecialParking = "";
public string strHonor = "";
public string strSlogan = "";





protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string bizId = Chukeh.Current.Cookie("bizid");
BindPage(bizId);
}
}
void BindPage(string bizId)
{
Xl_付费商家 biz = new Xl_付费商家();
biz.GetModel(Convert.ToInt32(bizId));
strName = biz.名字;
strCategory = biz.主类流水号.ToString();
strTag = biz.标签;
strIntroduce = biz.店面描述;
strMainProject = biz.主营项目;
strvip = biz.是否VIP.ToString();
strSpecial = biz.特色;
strConsumption = biz.人均消费;
strAddress = biz.地址;
strTraffic = biz.交通工具;
strBusName = biz.附近车站名;
strBuildSignature = biz.附近地标;
strTel = biz.电话;
strUrl = biz.网址;
strEmail = biz.Email;
strQq = biz.QQ;
strMsn = biz.MSN;
strselAddress = biz.子区域流水号.ToString();

strServiceTime = biz.营业时间;
strServiceArea = biz.营业面积 ;
strSeatNum = biz .座位数.ToString();
strRoom = biz.包间数.ToString();
strForHuman = biz.适合;
strParking = biz.免费停车;
strSpecialParking = biz.专属停车;
strHonor = biz.荣誉;
strSlogan = biz.口号;

BindColumn( biz.栏目流水号);



}
void BindColumn(int column)
{
XL_栏目 co = new XL_栏目();
ddlColumn.DataTextField = "名称";
ddlColumn.DataValueField = "栏目流水号";

ddlColumn.DataSource = co.GetBizColumn();
ddlColumn.SelectedValue= column.ToString();
ddlColumn.DataBind();

}
}
十八道胡同 2009-12-29
  • 打赏
  • 举报
回复
如果是控件的话 就可findcontrol来找到,然后转换类型,修改
wuyq11 2009-12-29
  • 打赏
  • 举报
回复
遍历页面控件
foreach(Control c in this.Controls)
{
if(c is TextBox)
{
}
}
十八道胡同 2009-12-29
  • 打赏
  • 举报
回复
页面有很多字段

62,254

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧