摘要: 1 在web.config中添加配置信息<configuration><connectionStrings><add name="conStr" connectionString="server=localhost;database=master;uid=sa;pwd="/></connectionStrings></configuration>*******************************/// dbcon 数据库的连接类,可调用静态函数创建/// </summary&g 阅读全文
posted @ 2011-04-26 17:50 天平盛世 阅读(944) 评论(0) 推荐(0) 编辑
摘要: Web.config: <appSettings> <add key= "ConnectionString " value= "data source=****;initial catalog=****;persist security info=False;user id=****;pwd=**** " /> </appSettings> Get it: string strConn = ConfigurationSettings.AppSettings[ "ConnectionString "] 阅读全文
posted @ 2011-04-26 17:48 天平盛世 阅读(440) 评论(0) 推荐(0) 编辑
摘要: .net方法namespace Controllers{ public class DocumentController { public ActionResult Index() { return View(); } public string GetDocumentUrl() { return Comment.documentUrl; } }}这中方式取不到值,原来我使用dataType:'json' 而。net中的方法返回值是string类型的。改成dataType: 'Text'就好了,或者直接去掉dataType:'json' 它会自动 阅读全文
posted @ 2011-04-26 16:06 天平盛世 阅读(2507) 评论(1) 推荐(0) 编辑