摘要:
1:首先创建asp.net mvc3应用程序2:创建项目完成后 找到controllers文件鼠标右击选择添加控制器3 为models文件夹添加一个linq to sql类文件,然后把数据库中的数据库复制进来。如截图操作4:添加控制器好后会生成一个HomeController.cs类文件,其代码如下:using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Mvc;using MvcTestData.Models;namespace MvcTestData. 阅读全文
摘要:
1创建silverlight应用程序2 在解决方案右击属性添加新项 添加 linq to sql3 把数据库中的表复制到linq to sql类中(注意:以下截图中红色方框需要自己修改)4 为项目添加 wcf服务5为wcf服务类文件中添加显示数据的函数其代码如下:using System;using System.Linq;using System.Runtime.Serialization;using System.ServiceModel;using System.ServiceModel.Activation;using StuEntity;using StuContent;using 阅读全文
摘要:
1前台代码:<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AddTable.aspx.cs" Inherits="AddTable" %><!DOCTYPE html><html><head runat="server"> <meta http-equiv="Content-Type" content="text/html; charset=utf 阅读全文
摘要:
1:前台代码:<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Repeater.aspx.cs" Inherits="Repeater" %><!DOCTYPE html><html><head runat="server"> <title></title></head><body> <form id="form1&quo 阅读全文
摘要:
1:注意要得把两个listbox的selectectionmode属性设置为mutiple2 后台代码:using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;public partial class TestListBox : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) {... 阅读全文
摘要:
1 前台代码:<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestPager.aspx.cs" Inherits="TestPager" %><%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %> <!DOCTYPE html><ht 阅读全文
摘要:
<html><head></head><body><table><caption>乘法表</caption><script type="text/javascript" >for( i=1;i<10;i++){ document.write("<tr>");//定义表格行 for(j=1;j<10;j++) { document.write("<td>");//定义表格列 document.write(& 阅读全文
摘要:
1:我们打开vs开发工具新建项目添加asp.net web 服务应用程序2 添加web应用程序服务好后可以先测试service.asmx文档3 我在后service.asmx后台添加四个功能函数(求和、差、乘、除)using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Services;using System.Xml.Linq;using System.Web.Services.Protocols;[WebService(Namespace = &quo 阅读全文
摘要:
创建表create table LoginUser( Pid number(6) primary key, username varchar(20) not null, userpwd varchar(20) not null, usertype varchar(12) not null); 创建序列create sequence LoginUser_seqincrement by 1start with 1nomaxvalue nominvaluenocache创建触发器其中一定要注意new.pid这个地方create or replace trigger tr_userbefor... 阅读全文
摘要:
1:我们首先打开vs2012创建空白解决方案如图1所示: 图12:我们再去右边的解决方案管理下面查看我们已经创建的空白方案并在添加四个文件夹(文件夹名依次为"表示层","模型层","数据访问层","业务逻辑层"注:它们谁在前后无所谓看个而言)如图2所示: 图23:我们为模型层文件夹添加对应的类库并添加对应的类名为“Users(这必须和数据库中的表名一样,因为要实现实体映射关系)”图3所示4我们为数据访问层文件夹添加类库以及在类库下面添加俩个名分别为“userservice”,“sqldbhelper”类这里类名可以 阅读全文