不明白楼主的意思,如果就是修改页面,那就不能用服务器端的控件了,只能用html标记。
<form>也不能用runat=server之类的了
<form>也不能用runat=server之类的了
解决方案 »
- 如何在asp.net页面中嵌入媒体播放器
- asp.net验证邮箱是否存在,有办法?
- 找到一个好用的分页存储过程,请教如何获取它的返回输出参数,类似于。。。
- 关于ajax的问题~! 60分求解~~!!
- 如何用一个Button来实现一键返回到倒数第二页的页面。类似IE的后退按钮,但是要直接回到倒数第二页
- 求助:提交按钮不能用了
- 求《构建Web解决方案—应用ASP.NET和ADO.NET》源码
- 如何在数据库取出本周的数据?
- 吐血散分啰!向大家问一个问题。
- 高手解决,超时问题,怎么解决呢?
- 如何用getElementById获取DataGrid的模板列ID!
- 如何实现cookie永久保存,而不是一年或几个月?
然后查看源文件,
就是html啦。
但是其实是ASPX的??
======================== 怎么搞的
如:index.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<TITLE>示例</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
</head>
<frameset cols="242,68%">
<frame name="contents" src="Menu.aspx">
<frame name="main" src="">
<noframes>
<pre id="p2">
================================================================
关于完成此内容框架集的说明
1. 为“contents”框架添加 src="" 页的 URL。
2. 为“main”框架添加 src="" 页的 URL。
3. 将 BASE target="main" 元素添加到“contents”页的
HEAD,以将“main”设置为默认框架,“contents”页的链接将
在该框架中显示其他页。
================================================================
</pre>
<p id="p1">
此 HTML 框架集显示多个 Web 页。若要查看此框架集,请使用支持 HTML 4.0 及更高版本的 Web 浏览器。
</p>
</noframes>
</frameset>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>CreateFile</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<FONT face="宋体">
<asp:TextBox id="TextBox1" style="Z-INDEX: 101; LEFT: 64px; POSITION: absolute; TOP: 56px" runat="server"
Width="584px"></asp:TextBox>
<asp:TextBox id="TextBox2" style="Z-INDEX: 102; LEFT: 64px; POSITION: absolute; TOP: 104px" runat="server"
Width="608px" TextMode="MultiLine" Height="408px"></asp:TextBox>
<asp:Button id="Button1" style="Z-INDEX: 103; LEFT: 296px; POSITION: absolute; TOP: 528px" runat="server"
Width="160px" Text="Button"></asp:Button></FONT>
</form>
</body>
</HTML>----------------------------------------
Imports System.io
Public Class CreateFile
Inherits System.Web.UI.Page#Region " Web 窗体设计器生成的代码 " '该调用是 Web 窗体设计器所必需的。
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() End Sub
Protected WithEvents TextBox1 As System.Web.UI.WebControls.TextBox
Protected WithEvents TextBox2 As System.Web.UI.WebControls.TextBox
Protected WithEvents Button1 As System.Web.UI.WebControls.Button '注意: 以下占位符声明是 Web 窗体设计器所必需的。
'不要删除或移动它。
Private designerPlaceholderDeclaration As System.Object Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: 此方法调用是 Web 窗体设计器所必需的
'不要使用代码编辑器修改它。
InitializeComponent()
End Sub#End Region Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'在此处放置初始化页的用户代码
End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim strTitle, strContent, strFolder As String
Dim i As Integer
Dim Arrjj As Array
strTitle = TextBox1.Text
strContent = TextBox2.Text
Arrjj = Split(strContent, "[page]")
Dim strFileName As String = Now.ToShortDateString.ToString & "_" & Now.Hour.ToString & "_" & Now.Minute.ToString & "_" & Now.Second.ToString & "_" & System.Guid.NewGuid.ToString.Substring(1, 3)
For i = 0 To UBound(Arrjj)
Dim strPath As String = Server.MapPath("News\" & Now.ToShortDateString.ToString & "\")
' 判断上传目录是否存在,不存在就建立
If (Not Directory.Exists(strPath)) Then
Directory.CreateDirectory(strPath)
End If
Try
Dim sw As StreamWriter = New StreamWriter(strPath & strFileName & "_" & i & ".shtml", False, System.Text.Encoding.Default) 'GetEncoding("gb2312")
' Add some text to the file.
sw.Write("<html>" & Chr(13))
sw.Write("<head>" & Chr(13))
sw.Write("<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>" & Chr(13))
sw.Write("<title>这是测试用的</title>" & Chr(13))
sw.Write("<style type=""text/css"">" & Chr(13))
sw.Write("<!--" & Chr(13))
sw.Write("body {" & Chr(13))
sw.Write(" font-size: 12px;" & Chr(13))
sw.Write("}" & Chr(13))
sw.Write("-->" & Chr(13))
sw.Write("</style>" & Chr(13))
sw.Write("</head>" & Chr(13))
sw.Write("<body>" & Chr(13))
'sw.Write("<!--#include file=""t.htm""--> " & Chr(13))
Dim str As String = Arrjj(i)
str = str.Replace(Chr(13), "<br>")
str = str.Replace(Chr(32), " " & Chr(32))
sw.Write("<center>" & strTitle & "</center><hr width=98% size=1>")
sw.Write(str & Chr(13))
'sw.WriteLine("header for the file.")
'sw.WriteLine("-------------------")
' Arbitrary objects can also be written to the file.
If UBound(Arrjj) - 1 > 1 Then
If i = 0 Then
sw.Write("<br><a href=" & strFileName & "_" & i + 1 & ".shtml>下一页</a> 当前第<font color=red>" & i + 1 & "</font>页/共<font color=red>" & UBound(Arrjj) + 1 & "</font>页")
ElseIf i > 0 And i < UBound(Arrjj) Then
sw.Write("<br><a href=" & strFileName & "_" & i - 1 & ".shtml>上一页</a> <a href=" & strFileName & "_" & i + 1 & ".shtml>下一页</a> 当前第<font color=red>" & i + 1 & "</font>页/共<font color=red>" & UBound(Arrjj) + 1 & "</font>页")
Else
sw.Write("<br><a href=" & strFileName & "_" & i - 1 & ".shtml>上一页</a> 当前第<font color=red>" & i + 1 & "</font>页/共<font color=red>" & UBound(Arrjj) + 1 & "</font>页")
End If
End If
sw.Write("<br>The date is: ")
sw.WriteLine(DateTime.Now)
sw.Write("</body>" & Chr(13))
sw.Write("</html>" & Chr(13))
sw.Close() Response.Write("OK")
Catch ex As Exception
Response.Write(ex.Message)
End Try
Next
Response.Redirect("/News/" & Now.ToShortDateString.ToString & "/" & strFileName & "_0.shtml") End SubEnd Class