摘要: 刚到公司混的时候,老板要求实现一个从C#的windows应用程序传参数到一个网页,然后这个网页不显示出来,但能把数据返回给应用程序的功能,问了好多人,找了好多资料,都搞不定,后来还是在老板的帮助下搞定的......,现在把方法写出来供大家参考。 ­ 其原理是,利用winfrom模拟表单提交数据,将要提交的参数提交给网页,网页执行代码,得到数据,然后Winform程序将网页的所有源代码读取下来,这样就达到windows应用程序和web应用程序之间传参和现实数据的效果了。 ­首先创建一个windows应用程序和web应用程序。 ­在web应用程序中,将网页切换到源代码 阅读全文
posted @ 2011-04-22 15:38 邪灵 阅读(2396) 评论(1) 推荐(0)
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication3{ class Program { static void Main(string[] args) { string username; username = Console.ReadLine(); Console.WriteLine("welcome {0}!",username); Console.ReadKey(); } }} 阅读全文
posted @ 2011-04-22 12:45 邪灵 阅读(70) 评论(0) 推荐(0)
摘要: "c:\\temp\\mydir\\my.doc"可以写成@"c:\temp\mydir\my.doc" 阅读全文
posted @ 2011-04-22 12:31 邪灵 阅读(643) 评论(0) 推荐(0)
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication3{ class Program { static void Main(string[] args) { int myinteger; string mystring; myinteger = 17; mystring = "\"myinteger\" is"; Console.WriteLine("{0} {1}." 阅读全文
posted @ 2011-04-22 12:18 邪灵 阅读(114) 评论(0) 推荐(0)
摘要: 在调试应用程序 最好使用Console.ReadKey();方便看出调试结果 阅读全文
posted @ 2011-04-22 11:21 邪灵 阅读(275) 评论(0) 推荐(0)
摘要: using System;using System.Collections.Generic;using System.Text;namespace ConsoleApplication2{ class Program { static void Main(string[] args) { Console.WriteLine("kais"); Console.ReadLine(); } }} 阅读全文
posted @ 2011-04-22 11:14 邪灵 阅读(118) 评论(0) 推荐(0)