随笔分类 - ASP.Net and MVC
摘要:1。asp.net mvc URL routingIIS determines the request should be handled by ASP.NETThe MvcHandler uses IControllerFactory to obtain an instance of IController using the "controller" route data from the route {controller}/{action}/{id}. public static void RegisterRoutes(RouteCollection routes)
阅读全文
摘要:public void Display(Dictionary<string, int> entry) { //int countTags = 0; foreach (KeyValuePair<string, int> en in entry) { HyperLink myHyperLink = new HyperLink(); myHyperLink.ToolTip = "关注度" + en.Value; if (en.Value > 10) { myHyperLink.Text = "&
阅读全文
摘要:1.引擎的实现部分(其中涉及到数据库的表的操作,这里使用的是存储过程):using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Data;using System.Data.SqlClient;using System.Text;using System.Text.RegularExpressions;using Internship.Data;namespace Internship.WebSite{ public static class Searching
阅读全文
摘要:  (1) 点击页面上的按钮,弹出一个对话框提示是“确定”还是“取消”操作,我们采用在按钮中添加属性来完成: 举例如下:     public System.Web.UI.WebControls.Button btnDelRow;     btnDelRow.Attributes.Add("onclick", "return confirm('确定要删吗?');"); &#
阅读全文
摘要:Some examples, with actual HTML Code included, follow:Simple MailTo<a href="mailto:astark1@unl.edu" mce_href="mailto:astark1@unl.edu">MailTo with Multiple Recipients<a href="mailto:astark1@unl.edu,ASTARK1@UNL.EDU" mce_href="mailto:astark1@unl.e
阅读全文
摘要:<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="msgid" DataSourceID="SqlDataSource1" BackColor="#DDDDDD" BorderStyle="None" BorderWidth="1px" CellPadding="5" Cell
阅读全文
摘要:1. asp.net mvc优势: 传统的asp.net网站我们会不自觉地在后台代码中掺杂了太多的逻辑的控制控制。分离的mvc使得web应用程序变得更加容易。同时三层架构能够更适合群体的开发,每个人可以有不同的分工。 2.什么是mvc? model主要是负责应用程序状态的存储,view主要是用来显示数据,其他的基本上什么也不做。controller主要是负责model和view的交互过程。 3.需要注意的是在asp.net mvc中大量使用了所谓的“默认配置”的情况,而不是像j2ee中存在的大量的配置文件。
阅读全文
摘要:http://mattberseth.com/blog/2007/07/modalpopupextender_example_for.html ModalPopupExtender Example for Editing Rows in a GridView (Master/Detail Scenario) The web application I am currently working on is a data-centric, internal facing application targeted at the knowledge workers within our enter
阅读全文
摘要:http://topic.csdn.net/u/20070121/15/f6c1a9b5-5002-486f-b219-c3b2d85367eb.html 我也有同样的问题,刚刚解决了 SqlParameter sp=new SqlParameter( "@temp ",SqlDbType.VarChar); 这句应该改为 SqlParameter sp=new SqlParameter( "@temp ",SqlDbType.VarChar,50); 初始化该字段时大小必须设置大小 不明白可以看这里 http://119116112.sp
阅读全文
摘要:string argName = ((ImageButton)sender).CommandName; string argArg = ((ImageButton)sender).CommandArgument;
阅读全文
摘要:这是个小问题,却花了我一定的时间,看来一些小知识点不得不关注 问题:从库中获取数据绑定到DropdownList,Dropdownlist写死了,只要与数据库中匹配数据就默认选中些项,读取数据正常,但放到Dropdwonlist中就会出现 不能在 DropDownList 中选择多个项 报错. 一开始以为是库中数据及业务逻辑有问题,检查后发现没啥,找了找DropdownList的帮助,终于发现了一个好东西。 ClearSelection() 加上它不会出现问题了:dropCurrenceType.ClearSelection(); 另外:有些朋友问及到当作更新时的数据如何绑定在Dropdown
阅读全文
摘要:CommandArgument=''
阅读全文
摘要:http://zhidao.baidu.com/question/80292168 相应的数据源找不到,删除没有的数据源即可。
阅读全文
摘要:http://www.cnblogs.com/huhu_315boy/archive/2008/10/22/1316998.html 在ASP.Net编程中,DateTime是很重要的数据类型,我们用DataTime对象来存储日期时间数据。但对于存储在DataTime对象中的数据,我们在取得日期时间时,一般只是一个形如“2002-08-27 11:18:08“的日期时间数字。但是在一些实例中我们需要的不仅仅是这一大串数字,我们需要取得具体的小时,分钟,秒,星期等等。 所幸的是,微软为我们的提供Format方法,使用我们能很快捷、方便的取得我们
阅读全文
摘要:ASP.NET中新的ListView控件为显示和CURD数据库操作提供了基于模板的布局,使之成为一项极好的方式,建立以数据为中心的Web应用程序。 当你编写以用户为中心的应用程序时,总需要某种形式的数据集,起码来说,你需要从一个数据源如关系数据库或XML文件检索数据,在显示给用户之前先要进行格式化,尽管ASP.NET之前的版本就提供了以数据为中心的显示控件如GridView,这些控件缺乏专业Web开发人员需要的可自定义和可扩展特性,为了解决这个问题,ASP.NET3.5提供了一个新的控件ListView,它提供了非常优秀的自定义和扩展特性,使用这些特性,你可以以任何格式显示数据,使用模板和样
阅读全文
摘要:providerName="System.Data.SqlClient" /> Data Source=服务器名 ;Initial Catalog=数据库名;Integrated Security=True
阅读全文
摘要:引起此问题的原因是在代码中存在“死循环”的地方。
阅读全文
摘要:iframe使用: <iframe id="mainFrame" name="mainFrame" src="./HomePageFrame.aspx" frameborder="0" scrolling="no" width="100%" height="550"> </iframe>
阅读全文
摘要:在vs开发时,新添加一个页面,连接过去时,出现“在分析向此请求提供服务所需资源时出错。请检查下列特定分析错误详细信息并适当地修改源文件。”错误,这个错误是由于iis没有自动编译出现的,重新rebuild即可。
阅读全文
摘要:查看源文件中是否存在下面的内容: 删除上面的一行或者是改变上面的默认的编码方式即可。
阅读全文