计划推出的《ASP.NET实战笔记》,提纲如下: 第一篇 典型的网站架构解决方案
第1章 系统目标
1.1 需求分析
1.2 系统目标
第2章 系统功能预览
2.1 用户管理
2.1.1. 用户注册
2.1.2. 用户登录
2.1.3. 权限控制
2.2 商品管理
2.2.1. 添加商品
2.2.2. 管理商品
2.2.3. 商品满意度
2.2.4. 管理商品评论
2.3 分类管理
2.3.1. 添加分类
2.3.2. 管理分类
2.3.3. 添加商品到分类
2.4 广告管理
2.4.1. 添加版位广告
2.4.2. 管理广告
2.4.3. ......
看了asp.net 的回调技术后不是很理解。还是把写的东西贴下,自己以后学习时候多看看。前台index.aspx页<%@ Page Language="C#" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="_Default" %>
<%@ Import Namespace = "System.Text" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>用户注册</title>
<mce:script language ="javascript"><!--
//客户端执行的方法
function Success(args,context)
{
message.innerText = args;
}
//下面的方法是当接收服务器方法处理的结果发生异常时调用的方法
function Error(args,context)
{
message.innerText = '发生了异常';
}
// --></mce:script>
</head>
<body>
<form id="form1" runat="server">
<div>
<table border = "1" cellpadding="0" cellspacing ......
自己在开发中碰到的+了一些在网上搜到的。。和大家分享下。
Dropdownlist无刷新的例子。xml.
例如文本验证!
下面是一个单选按纽前台不刷新的例子.有好的就往上贴
<mce:script language="javascript"><!--
function SetButton()
{
if(document.all.rdoByHuman.checked==true)
{
document.all.cboHrPut.disabled = "";
document.all.cboAnswerHr.disabled = "";
document.all.cboGroup.disabled = true;
}
if(document.all.rdoByGroup.checked==true)
{
document.all.cboHrPut.disabled = true;
document.all.cboAnswerHr.disabled = true;
document.all.cboGroup.disabled = "";
}
}
// --></mce:script>
<asp:RadioButton id="rdoByHuman" onclick="SetButton();" runat="server" GroupName="TotalGroup" Checked="True" Text="按人员"></asp:RadioButton>
e.Item.Attributes.Add("onmouseOver","this.style.backgroundColor='#dee3e7'");//鼠标移上去的颜色
e.Item.At ......
自己在开发中碰到的+了一些在网上搜到的。。和大家分享下。
Dropdownlist无刷新的例子。xml.
例如文本验证!
下面是一个单选按纽前台不刷新的例子.有好的就往上贴
<mce:script language="javascript"><!--
function SetButton()
{
if(document.all.rdoByHuman.checked==true)
{
document.all.cboHrPut.disabled = "";
document.all.cboAnswerHr.disabled = "";
document.all.cboGroup.disabled = true;
}
if(document.all.rdoByGroup.checked==true)
{
document.all.cboHrPut.disabled = true;
document.all.cboAnswerHr.disabled = true;
document.all.cboGroup.disabled = "";
}
}
// --></mce:script>
<asp:RadioButton id="rdoByHuman" onclick="SetButton();" runat="server" GroupName="TotalGroup" Checked="True" Text="按人员"></asp:RadioButton>
e.Item.Attributes.Add("onmouseOver","this.style.backgroundColor='#dee3e7'");//鼠标移上去的颜色
e.Item.At ......
=================================================================================
How to enable an ASP.NET WebService to listen to HTTP POST calls
=================================================================================
Imagine you developed an ASP.NET WebService, but the client that needs to use it wants to call it using HTTP POST instead of SOAP.
As default, when accessed from the localhost, all webservices listen both to SOAP and HTTP POST calls, but if accessed from another host they
listen only to SOAP.
My friend Google found a page on the MSDN site that explains how to change the protocols accepted by the ASP.NET runtime to listen to web
services calls.
As all configuration settings it can be changed both at machine level (machine.config) and per single application inside the web.config.
The configuration section is named <webServices> and is inside the <system.web> section.
The default configuration (the one that is inside a newly installed machi ......
1、定义CS类 using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Web.Configuration;
using Hasher;
/**//// <summary>
/// cs 的摘要说明
/// </summary>
///
namespace cs
...{
public class cs
...{
//判断序列号
public bool css()
//m为配置文件值
//x为序列号值
//css进行比较该注册码是否正确
...{
Hasher.Hasher hash = new Hasher.Hasher();
&nb ......
1、定义CS类 using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Web.Configuration;
using Hasher;
/**//// <summary>
/// cs 的摘要说明
/// </summary>
///
namespace cs
...{
public class cs
...{
//判断序列号
public bool css()
//m为配置文件值
//x为序列号值
//css进行比较该注册码是否正确
...{
Hasher.Hasher hash = new Hasher.Hasher();
&nb ......
1. 打开新的窗口并传送参数 [返回目录]
传送参数:
response.write("<script>window.open('*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"')</script>")
接收参数:
string a = Request.QueryString("id");
string b = Request.QueryString("id1");
2.为按钮添加对话框 [返回目录]
Button1.Attributes.Add("onclick","return confirm('确认?')");
button.attributes.add("onclick","if(confirm('are you sure...?')){return true;}else{return false;}")
3.删除表格选定记录 [返回目录]
int intEmpID = (int)MyDataGrid.DataKeys[e.Item.ItemIndex];
string deleteCmd = "Delete from Employee where emp_id = " + intEmpID.ToString()
4.删除表格记录警告 [返回目录]
private void DataGrid_ItemCreated(Object sender,DataGridItemEventArgs e)
{
switch(e.Item.ItemType)
{
case ListItemType.Item :
case ListItemType.AlternatingItem :
case ListItemType.EditItem:
TableCel ......