上一页 1 ··· 6 7 8 9 10 11 12 下一页
摘要: View Code 1 public partial class City : System.Web.UI.Page 2 { 3 protected void Page_Load(object sender, EventArgs e) 4 { 5 if(!IsPostBack) 6 { 7 BindProv(); 8 BindCity(); 9 }10 }11 12 //绑定市13 private void BindCity()14 {15 ddlcity.Items.Clear();16 DataTable citydt = new CitySer().GetAllCityByProvId( 阅读全文
posted @ 2011-05-31 11:13 笨笨的菜鸟 阅读(516) 评论(1) 推荐(0)
摘要: 1.添加DLL引用,文件名为:AspNetPager.dll。2.在aspx文件中添加<%@ RegisterAssembly="AspNetPager" Namespace="Wuqi.Webdiyer"TagPrefix="webdiyer" %>代码,下面是分页样式代码:3.在CS文件中写using Wuqi.Webdiyer;4.获取数据源,下面是获得数据的一个方法,BLL.Trunk.GetAllList方法是一个封装过的方法,返回一个DataSet结果集,这个方法自己写就可以,这是来自项目中的代码:View C 阅读全文
posted @ 2011-05-30 17:55 笨笨的菜鸟 阅读(1014) 评论(0) 推荐(0)
摘要: View Code 1 /// <summary> 2 /// 历史记录 3 /// </summary> 4 private static int sumcount; 5 private void BindHistory() 6 { 7 this.gdvHistory.DataSource = null; 8 this.gdvHistory.DataBind(); 9 DataTable table = null;10 DateTime dtst = Convert.ToDateTime(DateTime.Now.ToShortDateString() + &quo 阅读全文
posted @ 2011-05-30 17:45 笨笨的菜鸟 阅读(424) 评论(0) 推荐(0)
摘要: 首先页面布置好控件代码是这样的View Code 1 Code 2 Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> 3 <%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %> 4 < 阅读全文
posted @ 2011-05-30 16:32 笨笨的菜鸟 阅读(513) 评论(0) 推荐(0)
摘要: 1.View Code 1 using System.Text; 2 using System.IO; 3 4 XmlNode xmlNode1; 5 XmlDataDocument xd=new XmlDataDocument(); 6 StringBuilder xmlString1; 7 8 xmlNode1=DataSet1;//DataSet1为返回的数据集 9 if(xmlNode1==null) //--存储过程执行失败10 return;11 xmlString1=new StringBuilder(xmlNode1.OuterXml);12 if(xmlString1.ToS 阅读全文
posted @ 2011-05-27 17:25 笨笨的菜鸟 阅读(761) 评论(0) 推荐(0)
摘要: 第一种是写在代码里的View Code 1 Response.Redirect("adminUpdate.aspx?userName=" + gvAdminInFo.SelectedRow.Cells[1].Text.ToString().Trim() + "&userJiaoSe=" + gvAdminInFo.SelectedRow.Cells[2].Text.ToString().Trim() +2 "&userStart=" + gvAdminInFo.SelectedRow.Cells[3].ToString 阅读全文
posted @ 2011-05-27 16:45 笨笨的菜鸟 阅读(430) 评论(2) 推荐(0)
摘要: C#中改变dgv中的字体很简单的,只需要一个简单的方法,就OK了View Code 1 //改变字体 2 private void btnFont_Click(object sender, EventArgs e) 3 { 4 try 5 { 6 FontDialog fontDialog = new FontDialog(); 7 fontDialog.Color = dgvHistroy.RowTemplate.DefaultCellStyle.ForeColor; 8 fontDialog.Font = dgvHistroy.RowTemplate.DefaultCellStyle.Fo 阅读全文
posted @ 2011-05-26 10:34 笨笨的菜鸟 阅读(451) 评论(0) 推荐(0)
摘要: View Code 1 privatestaticint nciisMoidyOffFinance(IP_OrderDrivingLicence model_orders, int typeId)2 {3 //查询消费时,保存记录编号4 int OrderId =0;5 using (SqlConnection connection =new SqlConnection(SqlHelper.connectionString))6 {7 connection.Open();8 //使用当前的SQL连接 创建事务并添加共享锁9 SqlTransaction tran = connection.Be 阅读全文
posted @ 2011-05-25 16:54 笨笨的菜鸟 阅读(293) 评论(0) 推荐(0)
摘要: View Code 1 /// <summary> 2 /// 过滤html标签 3 /// </summary> 4 /// <param name="strHtml">html的内容</param> 5 /// <returns></returns> 6 public static string StripHTML(string stringToStrip) 7 { 8 // paring using RegEx // 9 stringToStrip = Regex.Replace(stringTo 阅读全文
posted @ 2011-05-24 16:47 笨笨的菜鸟 阅读(863) 评论(2) 推荐(0)
摘要: asp.net如何读取xml文件中的数据2008-01-20 16:42news.xml文件:View Code 1 <?xml version="1.0" encoding="gb2312"?><xinwen><news> <news_id>5</news_id> <news_title>XML新闻发布系统</news_title> <news_author>***</news_author> <news_ly>原创</news 阅读全文
posted @ 2011-05-20 08:44 笨笨的菜鸟 阅读(3482) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 下一页