G
Guest
greetings, attach below are javascripts, if you notice there is a keyword called escape which encodes the entire file and pass onto another fill to be decoded.
here are my implementation for javascript to encode and vb.net to decode it. the problem that i'm facing is that it wont decode the value pss in from javascript. although i'm able ot display it, but lots of encoded value. how can i decode this rpoblem?
<SCRIPT language="JavaScript">
function btnDownload_onClick()
{
document.frmTempateSubmit.hdnDataGridDownload.value = escape(document.all.item("dgDS2Excel").outerHTML);
document.frmTempateSubmit.target = "_new";
document.frmTempateSubmit.method = "post";
document.frmTempateSubmit.action = "SCTemplateSubmission.aspx";
document.frmTempateSubmit.submit();
}
</SCRIPT>
Dim str As String
Try
Str = Request.Form("hdnDataGridDownload")
Catch ex As Exception
End Try
Dim sw As New System.IO.StreamWriter("C:\datt temp\temp.htm", True)
Dim losf As New LosFormatter
sw.WriteLine(str)
sw.WriteLine(System.Web.HttpUtility.HtmlDecode(System.Web.HttpUtility.HtmlDecode(str)))
sw.Close()
here are my implementation for javascript to encode and vb.net to decode it. the problem that i'm facing is that it wont decode the value pss in from javascript. although i'm able ot display it, but lots of encoded value. how can i decode this rpoblem?
<SCRIPT language="JavaScript">
function btnDownload_onClick()
{
document.frmTempateSubmit.hdnDataGridDownload.value = escape(document.all.item("dgDS2Excel").outerHTML);
document.frmTempateSubmit.target = "_new";
document.frmTempateSubmit.method = "post";
document.frmTempateSubmit.action = "SCTemplateSubmission.aspx";
document.frmTempateSubmit.submit();
}
</SCRIPT>
Dim str As String
Try
Str = Request.Form("hdnDataGridDownload")
Catch ex As Exception
End Try
Dim sw As New System.IO.StreamWriter("C:\datt temp\temp.htm", True)
Dim losf As New LosFormatter
sw.WriteLine(str)
sw.WriteLine(System.Web.HttpUtility.HtmlDecode(System.Web.HttpUtility.HtmlDecode(str)))
sw.Close()