C# 向Sql-server数据库保存图片
摘要:先打开一个图片文件private void Image(object sender, EventArgs e) { OpenFileDialog fileDialog = new OpenFileDialog(); fileDialog.Filter = "图片文件|*.jpg"; fileDialog.Multiselect = false; if (fileDialog.ShowDialog() == DialogResult.OK) { //图片地址 this.textBoxImage.Text = fileDialog.FileName; } }保存图片privat
阅读全文
posted @
2011-07-18 10:26
刁健
阅读(397)
推荐(0)
C# Ado.NET连接Sql-server
摘要:一个Sql-server数据库连接,只适合初学者哦using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;using System.Data.SqlClient;namespace DataAccess{ /// <summary> /// 操作数据库公共类 /// </summary> class SqlDataAccess : IDisposable { /// <summary> /// 数据库连接字符串 //
阅读全文
posted @
2011-07-18 09:52
刁健
阅读(568)
推荐(0)
ASP.NET中两个页面之间的信息传递
摘要:主要是设置PostBackUrl属性值,设置为你所需要跳转页面的名称("~/Default2.aspx"),然后再("~/Default2.aspx")页面中用PreviousPage.FindControl()方法找到所需要当前页的控件。代码: Default.aspx:<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>&l
阅读全文
posted @
2011-07-17 19:18
刁健
阅读(368)
推荐(0)