我需要澄清的天氣我可以將網頁保存到的StringBuilder或點擊一個按鈕爲HTML格式的字符串數據保存當前網頁作爲字符串與標籤
我的HTML頁面
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
</head>
<body>
<form id="form2" runat="server">
<div onload="disableBackButton();">
<table align="center" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
<table align="center" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
<div style="padding: 5px; cursor: pointer; vertical-align: middle;">
<div style="float: left; font-size:large; color:Blue; width: 358px;">
( Heading) </div>
<div style="float: left; margin-left: 20px;">
</div>
<div style="float: right; vertical-align: middle;">
</div>
</div>
</td>
</tr>
<tr>
<td>
<table cellpadding="5">
<tr >
<td align="left" valign="top" style="height: 18px">
<asp:Label ID="Label1" runat="server" Font-Bold="True" ForeColor="#003399" Font-Size="14pt"
Font-Names="Times New Roman" Text="Name"></asp:Label>
</td>
<td style="width: 175px">
<asp:TextBox ID="TextBox1" runat="server" Width="170px" Height="20px"></asp:TextBox>
</td>
<%--<td width="320px">--%>
<td width="250px">
</td>
<td>
<asp:Label ID="Label2" runat="server" Font-Bold="True" ForeColor="#003399" Font-Size="14pt"
Font-Names="Times New Roman" Text="Date"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtDate" runat="server" Width="120px" Height="20px"
ReadOnly="True"></asp:TextBox>
</td>
</tr>
</table>
<table>
<tr>
<td align="center" colspan=2 width="780px">
</td>
</tr>
<tr>
<td align="Left" colspan=3 style=" font-size:18Px; font-family:Times New Roman">
data /////
<br />
<br />
data//
<br>
<br />
Please answer every question.
<br />
<br />
</td>
</tr>
<tr >
<td style="height: 20px; width: 550px;" align=center>
<asp:Label ID="Label3" runat="server"
Text="question." Font-Bold="True"
Font-Size="20px" Font-Underline="True" ForeColor="Navy"
Font-Names="Times New Roman"></asp:Label>
</td>
<td style="height: 20px; width: 240px;" align=center colspan="2">
<asp:Label ID="Label4" runat="server"
Text="Click Your Response" Font-Bold="True"
Font-Size="20px" Font-Underline="True" ForeColor="Navy"
Font-Names="Times New Roman"></asp:Label>
</td>
</tr>
<tr>
<td align="Left" style=" font-size:18Px; font-family:Times New Roman" height="45px">
1. hi do you have car
</td>
<td align="center" width="100px" height="35px">
<asp:RadioButton ID="RadioButton1" CssClass="scaledRadioButton" runat="server" GroupName="Question1"
Text="Yes" Font-Size="12px" Height="20px" Width="49px"/>
</td>
<td align="left" width="100px" height="45px">
<asp:RadioButton ID="RadioButton2" runat="server"
GroupName="Question1" Text="No"
Font-Size="12px" CssClass="scaledRadioButton" Height="20px" Width="49px"/>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
在後面的代碼我結合來自數據庫端的值在負載 這樣
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim xmldoc As New XmlDocument
Dim xmldata As String = "<data><rdBx1>True</rdBx1></data>"
Dim stringReader As New StringReader(kioskxml)
xmldoc.Load(stringReader)
stringReader.Dispose()
If (XmlNodeNavigator.InitializeXmlNodeNavigator(xmldata)) Then
Dim Q1 As String = XmlNodeNavigator.RetrieveElementValue("//data/rdBx1")
If (Q1 = "True") Then
RdbtnQ1Yes.Checked = True
Else
RdBtnQ1No.Checked = True
End If
End If
End Sub
現在我想保存噸他作爲數據基礎 點擊一個按鈕的HTML數據綁定頁面謝謝
你的意思是網頁的地址?它的HTML? – 2014-10-07 10:20:25
我需要頁面的html @Hrvach – 2014-10-07 10:24:16
你需要什麼保存頁面html?你需要恢復其狀態嗎? – Fabio 2014-10-14 06:38:39