您目前尚未登陆,请选择【登陆】或【注册
首页->全站代码->小范企业管理源码>>admin/news_type_Add.aspx.cs>>代码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:小范企业管理源码


当前文件路径:XiaoFanWeb/admin/news_type_Add.aspx.cs 文件类型
普通视图
		            
1using System; 2using System.Data; 3using System.Configuration; 4using System.Collections; 5using System.Web; 6using System.Web.Security; 7using System.Web.UI; 8using System.Web.UI.WebControls; 9using System.Web.UI.WebControls.WebParts; 10using System.Web.UI.HtmlControls; 11 12using System.Data.OleDb; 13public partial class admin_news_type_Add : System.Web.UI.Page 14{ 15 protected void Page_Load(object sender, EventArgs e) 16 { 17 18 } 19 protected void Button1_Click(object sender, EventArgs e) 20 { 21 try 22 { 23// 24 OleDbConnection oledbcon = new OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0;data source=" + HttpContext.Current.Server.MapPath(@"~/App_Data/dbs.mdb")); 25 string InString = "insert into FZ_News_Type(Name,Pid,Ord)values('" + TextBox1.Text.ToString()+ "','" + DropDownList1.SelectedValue + "','" + Convert.ToInt32(TextBox2.Text.ToString()) + "')"; 26 oledbcon.Open(); 27 OleDbCommand cmd = new OleDbCommand(InString, oledbcon); 28 cmd.ExecuteNonQuery(); 29 oledbcon.Close(); 30 Response.Redirect("news_type_admin.aspx"); 31 } 32 33 catch (Exception M) 34 { 35 36 Response.Write(M.Message); 37 } 38 } 39} 40
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:小范企业管理源码

- MTCPager V1.0通用分页控件及..

- Asp.net企业网站管理系统源码..

- Asp.net3.5 MVC入门之文章管..

- Asp.net简单多用户Blog程序源码

- WebTextPane 在线编辑器

- 某学院学生信息管理系统源码

- 简单相册源码(利用ajax实现幻..

- 书爸爸电子书连载网源码

51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号