.cs时.aspx的后台代码,也可以在Button1_Click处添加断点调试。
解决方案 »
- Jquery返回值问题
- 关于findControl("id")和controls[number]的区别?
- 用户控件里的javascript不能用
- GridView有没有?
- (新手问题)ASP.NET程序在服务器上不能正常运行.
- ASP.NET错误~~~请教啊~~
- 我看到有的网页是有多个页面文件组成,比如上面是Head.aspx,左边是Tree.aspx,中间的页面根据用户点击Tree来切换不同的页面,请问这是怎么实
- vbc /t: library quote.vb 报找不到libray文件,请大家指点;
- web页面动态显示图片
- 本人用vb.net做的个人主页正式开通,欢迎大家提供保贵的意见。(zxj.yc365.com)
- 请各位大虾都来帮帮我吧!
- .net环境下Debug WEB程序,IIS经常会莫名其妙地死掉,重起IIS也没有反应
.aspx的服务器端代码可以通过添加断点调试。
这样就可以调试了。
<%@ Page language="c#" Codebehind="index.aspx.cs" AutoEventWireup="false" Inherits="hello.WebForm1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<%@ Page language="c#" Codebehind="index.aspx.cs" AutoEventWireup="false" Inherits="hello.WebForm1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<SCRIPT language="C#" runat="server"></SCRIPT>
之间的代码应该放在.aspx.cs文件中。
为什么button的onServerClick不能实现???
我是初学者,
不知道index.aspx与index.aspx.cs该怎么用???index.aspx中的内容:<%@ Page language="c#" Codebehind="index.aspx.cs" AutoEventWireup="false" Inherits="hello.WebForm1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>hello</title>
<meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
</HEAD>
<body MS_POSITIONING="GridLayout">
<center><a>button</a>
<hr>
<form runat="server" ID="Form1">
<button id="button1" onmouseover="this.style.backgroundColor='white';this.style.color='black';" style="FONT-WEIGHT: normal; FONT-SIZE: 12pt; COLOR: white; LINE-HEIGHT: normal; FONT-STYLE: normal; BACKGROUND-COLOR: black; FONT-VARIANT: normal" onmouseout="this.style.backgroundColor='black';this.style.color='white';" type="button" runat="server" onserverclick="button1_ServerClick">
欢迎来到ASPCN.COM</button>
</form>
</center>
</body>
</HTML>index.aspx.cs中的内容:using System;
using System.Collections;
using System.ComponentModel;
usi
{
Response.Redirect("http://www.aspcn.com");
}
为什么按钮无效?
双击一下button 可以出现
public void Button1_Click(object sender,EventArgs e)
....了如果html和代码一个页面,则没有你的第一行变为:
<%@ Page language="c#" %>