Get HTML source code for editable iframe on server side
Source: Internet
Author: User
Server | Source code The following example implements the HTML source code for an editable iframe on the server side. The code is simple, the pain here is not much explained. The code is as follows:
Public Class getiframehtml
Inherits System.Web.UI.Page
Protected WithEvents Cmdsend as System.Web.UI.WebControls.Button
Protected WithEvents ifrhtml as System.Web.UI.HtmlControls.HtmlGenericControl
#Region "Web Form Designer generated Code"
' This are required by the Web Form Designer.
<system.diagnostics.debuggerstepthrough () > Private Sub InitializeComponent ()
End Sub
Private Sub Page_Init (ByVal sender as System.object,_
ByVal e as System.EventArgs) Handles Mybase.init
' Codegen:this Method-required by the Web Form Designer
' Do not modify it using the ' Code Editor.
InitializeComponent ()
End Sub
#End Region
Private Sub Page_Load (ByVal sender as System.object,_
ByVal e as System.EventArgs) Handles MyBase.Load
CMDSEND.ATTRIBUTES.ADD ("OnClick", "Document.frmMain.hidValue.value" + _
"= IfrHTML.document.body.innerHTML;")
End Sub
Private Sub cmdSubmit_Click (ByVal sender as System.object,_
ByVal e as System.EventArgs) Handles Cmdsend.click
Dim strvalue as String
strvalue = Request.Form ("Hidvalue")
Response.Write (Server.htmldecode (strvalue))
End Sub
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service