文章分类 - .net
webServices实例说明序列化和反序列化
摘要:WebService应该是一个基于Http,Soap的协议栈。底层还是依赖着Http协议(一般来说)。 可以把对象经过XML序列化之后或者是服务A上的XML读进String里,然后返回。这样调用再把String里的XML反序列化或者读成XML文件就可以了。(当然方法很多) 如果都是.Net调用,而且是一个solution里的工程(两个WebService)那么返回自定义对象也是可以的。 //Web...
阅读全文
XML、DataSet、DataGrid结合写成广告管理程序 ---- (转自飞刀)
摘要:本文介绍一下ASP.Net中对XML的用法,这里只是展现了XML与DataSet相结合的用法。其实ASP.Net对XML的操作的方法与对象是很多的,比如XmlDataDocument,XmlTextReader等,这些对象功能很全,也很实用。 本文以Adrotator使用的XML为例(新手可以先看一下Adrotator控件的用法),写出了一个广告管理程序。这个程序,飞刀用到的控件主要是Data...
阅读全文
防止多重启动之调用Api (效果:第二次启动程序则前一进程的窗口跳到最前)
摘要:using System.Threading;private const int SW_NORMAL = 1; // see WinUser.h for definitions private const int SW_RESTORE = 9; [DllImport("User32",EntryPoint="FindWindow")] static extern IntPtr FindWi...
阅读全文
datagrid内容导入excel
摘要:vb:Private Sub ExportDataGrid(ByVal FileType As String, ByVal FileName As String) Response.Charset = "GB2312" Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312") ...
阅读全文
解决:从客户端(...)中检测到有潜在危险的 Request.Form 值。 说明: 请求验证过程检测到有潜在危险的客户端输入值...
摘要:1、web.config文件后面加入这一句: 示例: 2、在*.aspx文件头的Page中加入validateRequest="false",示例如下:
阅读全文
Q: How can I put a checkbox in a column of my DataGrid?(.net winform)
摘要:You create a custom DataTableStyle that contains column styles for each column you want to display. You add the column styles in the order you want them to appear. Here are the steps to add an string ...
阅读全文
得到数据库表结构信息(How To Retrieve Schema Information by Using GetOleDbSchemaTable and Visual C# .NET)
摘要:How To Retrieve Schema Information by Using GetOleDbSchemaTable and Visual C# .NETuse OleDbConnection's GetOleDbSchemaTable method, see http://support.microsoft.com/kb/309681/EN-US/
阅读全文
两句话防止程序多重启动(.net winform)
摘要:using System.Threading;static void Main() { Mutex m_Ctmt = new Mutex(true, "MutexInstance"); if (m_Ctmt.WaitOne(0,false)) { Application.Run(new CtServerAp_Main()); } else { Messag...
阅读全文
浙公网安备 33010602011771号