Hi I have a Javascript function as follows
function getHtml()
{
var src = document.documentElement.innerHTML;
document.forms[0]['HtmlSource'].value = src;
}
I would like to be able to execute this function by calling it from ASP.NET
I had tried this solution
Button2.Attributes.Add("onClick", "javascript:getHtml()")
However this only works on button clicks or other events etc. I have a function e.g.
Function create() As Integer
html = HtmlSource.Text
Dim fp As StreamWriter
fp = File.CreateText(Server.MapPath(".\Invoices\") & eref & ".htm")
fp.WriteLine(html)
fp.Close()
End Function
I would like to be able to run the JavaScript function by calling it from within the create() function but without the event.
Thanks
...
Go to the complete details ...