How to execute code from dynamic generated button - button

i try to make a gui (hta) which can install on a client, one or more printers from the printer server.
the problem is when i create the button "install", the function is executed on form load and not by clicking on the button.
i don't understand why. can you help me please?
<HTML>
<HEAD>
<TITLE>printer installation</TITLE>
<HTA:APPLICATION ID = 'AppBase'>
<script language="VBScript">
Dim WshNetwork, objPrinter, intDrive, intNetLetter
strComputer = "change_printer_server_name_or_ip"
strHTML = "<TABLE BORDER='0'>"
Set WshNetwork = CreateObject("WScript.Network")
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colInstalledPrinters = objWMIService.ExecQuery("Select * from Win32_Printer")
For Each objPrinter in colInstalledPrinters
strHTML = strHTML & "<TR><TD><input type='button' value='install printer' name='" & objPrinter.Name & "' onclick='" & installprinter(printname, printserver) &"'>" & objPrinter.Name & "</input></TD><TD>" & objPrinter.Location & "</TD><TD>" & objPrinter.portname & "</TD></TR>"
next
strHTML = strHTML & "</TABLE>"
DataArea.InnerHTML = strHTML
function installprinter(printname, printserver)
Set WshNetwork = CreateObject ("WScript.Network")
on error resume next
PrinterPath = "\\" & printserver & "\" & printname
WshNetwork.RemovePrinterConnection PrinterPath, true, true
WshNetwork.AddwindowsPrinterConnection (PrinterPath)
msgBox "L'imprimante a été installée avec succès"
end function
</script>
</HEAD>
<BODY>
<span id="DataArea"></span>
</BODY>

The load order of your page is important.
When you attempt to assign DataArea, the DOM is not yet initialised, so DataArea does not exist. Here is a simple example of how to invoke your code when the DOM is ready:
<html>
<head>
<title>printer installation</title>
<HTA:APPLICATION ID = 'AppBase'>
<script language="VBScript">
strHTML = "<TABLE BORDER='0'>"
strHTML = strHTML & "<tr><td>Testing</td></tr>"
strHTML = strHTML & "</TABLE>"
Function OnLoad()
DataArea.InnerHTML = strHTML
End Function
</script>
</head>
<body onload="OnLoad">
<span id="DataArea"></span>
</body>
</html>
Note the <body onload="OnLoad"> and the new Function OnLoad().
EDIT - Updated to include a function invoked from the generated html:
<html>
<head>
<title>printer installation</title>
<HTA:APPLICATION ID = 'AppBase'>
<script language="VBScript">
strHTML = "<TABLE BORDER='0'>"
strHTML = strHTML & "<tr><td><button onclick=""TestingFunction"">Testing</button></td></tr>"
strHTML = strHTML & "</TABLE>"
Function OnLoad()
DataArea.InnerHTML = strHTML
End Function
Function TestingFunction()
MsgBox("Hello")
End Function
</script>
</head>
<body onload="OnLoad">
<span id="DataArea"></span>
</body>
</html>

You are actually calling your installprinter routine when generating your HTML. Instead you need to format the HTML to be a valid call at the time the button is clicked. You want your eventual HTML to look like this:
<TR><TD><input type='button' value='install printer' name='PrinterName'
onclick='installprinter "PrinterName", "PCName"'>PrinterName</input></TD>
<TD>PrinterLoc</TD>
<TD>PortName</TD></TR>
Note that since you're calling a sub, you exclude the parentheses. It looks weird but that's the way VBScript works. So your code to generate a table row should go like this instead:
strHTML = strHTML & "<TR><TD><input type='button' value='install printer' name='" & _
objPrinter.Name & "' onclick='installprinter """ & objPrinter.Name & """, """ & _
strComputer & """'>" & objPrinter.Name & "</input></TD><TD>" & _
objPrinter.Location & "</TD><TD>" & objPrinter.portname & "</TD></TR>"

Related

Pop Up Window in VB.Net(aspx.vb) Code Behind

I have onclick button and when i debug,i found that my onclick value is NULL.Anyone Know why it cant get value for Onclick event.
Dim HTMLForm As New StringBuilder
HTMLForm.Append("<html>")
HTMLForm.AppendLine("<body onload='document.forms[""" & "form1" & """].submit()'>")
HTMLForm.AppendLine("<form id='form1' method='POST'>" )
'Set value to collection
SetRequestField("amount", CDec(lblTtlPayAmt.Text))
'Generate HTML content using collection
For Each kvp As KeyValuePair(Of String, String) In RequestFields
If Not String.IsNullOrEmpty(kvp.Value) Then
HTMLForm.AppendLine("<input type='hidden' id='" & kvp.Key & "' name='" & kvp.Key & "' value='" & kvp.Value & "' />")
End If
Next
HTMLForm.AppendLine("<input type = 'submit' value=PayNow' onclick = '" & window.open("~/Payment/Payment.aspx") & "'/>")
HTMLForm.AppendLine("</form>")
HTMLForm.AppendLine("</body>")
HTMLForm.AppendLine("</html>")
Response.Clear()
Response.Write(HTMLForm.ToString())
You have a missing ' on the line which adds the submit button:
HTMLForm.AppendLine("<input type = 'submit' value=PayNow' ....
should be
HTMLForm.AppendLine("<input type = 'submit' value='PayNow' ....

Podcast rss feed reading itunes image in classic asp

I'm working on a rss feed reader and seems so work great.
The only thing that I seem not to get working is to read the image in the feed.
<itunes:image href="http://www.itunes.com/image.jpg"/>
Can anyone help?
This is a part of my code.
For Each objItem in objItems
On Error Resume Next
TheTitle = objItem.selectSingleNode("title").Text
TheLink = objItem.selectSingleNode("image").Text
Theimg = objItem.SelectSingleNode("itunes").Attributes(":image").InnerText
Response.Write "<div class='article'>" &_
"<a href=" & TheLink & ">" & _
"<span>" & Theimg & TheTitle & "</span>" & _
"</a>" & _
"</div>"
Next
Your image address needs to go inside an image tag
Response.Write "<div class=""article"">" &_
"<a href=""" & TheLink & """>" & _
"<img src=""" & Theimg & """ alt=""" & TheTitle & """ />" & _
"</a>" & _
"</div>"
If you're wondering why all the double quotes, see this question
Adding quotes to a string in VBScript
As an aside, if you understand XSL then I find that the best way to handle RSS feeds in Classic ASP is to do a server side XSLT transformation. The ASP looks like this
set xml = Server.CreateObject("Msxml2.DomDocument.6.0")
xml.setProperty "ServerHTTPRequest", true
xml.async = false
xml.validateOnParse = false
xml.load("http://your-rss-feed")
set xsl = Server.CreateObject("Msxml2.DomDocument.6.0")
xsl.load(Server.Mappath("yourxslfile.xsl"))
Response.Write(xml.transformNode(xsl))
set xsl = nothing
set xml = nothing

need to implement recaptcha in .asp page

anyone please know how to add recaptcha in .asp , i am having public and privte keys
<TD align="middle">Security Code: </TD>
<TD align="middle">
<script type="text/javascript"
src="http://www.google.com/recaptcha/api/challenge?k=01M2eMS32Xs6oGtCaBu3AkHQ==">
</script>
<noscript>
<iframe src="http://www.google.com/recaptcha/api/noscript?k=01M2eMS32Xs6oGtCaBu3AkHQ=="
height="300" width="500" frameborder="0"></iframe><br>
<textarea name="recaptcha_challenge_field" rows="3" cols="40">
</textarea>
<input type="hidden" name="recaptcha_response_field"
value="manual_challenge">
</noscript>
</TD>
Using reCAPTCHA with Classic ASP
The reCAPTCHA ASP guide provides a simple way to place a CAPTCHA on your ASP page, helping you stop bots from abusing it. The code below wraps the reCAPTCHA API.
After you've signed up for your API keys, you can add reCAPTCHA to your classic ASP site by pasting the code below at the top of your ASP page:
<%
recaptcha_challenge_field = Request("recaptcha_challenge_field")
recaptcha_response_field = Request("recaptcha_response_field")
recaptcha_public_key = "your_public_key" ' your public key
recaptcha_private_key = "your_private_key" ' your private key
' returns the HTML for the widget
function recaptcha_challenge_writer()
recaptcha_challenge_writer = _
"<script type=""text/javascript"">" & _
"var RecaptchaOptions = {" & _
" theme : 'red'," & _
" tabindex : 0" & _
"};" & _
"</script>" & _
"<script type=""text/javascript"" src=""http://www.google.com/recaptcha/api/challenge?k=" & recaptcha_public_key & """></script>" & _
"<noscript>" & _
"<iframe src=""http://www.google.com/recaptcha/api/noscript?k=" & recaptcha_public_key & """ frameborder=""1""></iframe><>" & _
"<textarea name=""recaptcha_challenge_field"" rows=""3"" cols=""40""></textarea>" & _
"<input type=""hidden"" name=""recaptcha_response_field""value=""manual_challenge"">" & _
"</noscript>"
end function
' returns "" if correct, otherwise it returns the error response
function recaptcha_confirm(rechallenge,reresponse)
Dim VarString
VarString = _
"privatekey=" & recaptcha_private_key & _
"&remoteip=" & Request.ServerVariables("REMOTE_ADDR") & _
"&challenge=" & rechallenge & _
"&response=" & reresponse
Dim objXmlHttp
Set objXmlHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
objXmlHttp.open "POST", "http://www.google.com/recaptcha/api/verify", False
objXmlHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
objXmlHttp.send VarString
Dim ResponseString
ResponseString = split(objXmlHttp.responseText, vblf)
Set objXmlHttp = Nothing
if ResponseString(0) = "true" then
'They answered correctly
recaptcha_confirm = ""
else
'They answered incorrectly
recaptcha_confirm = ResponseString(1)
end if
end function
server_response = ""
newCaptcha = True
if (recaptcha_challenge_field <> "" or recaptcha_response_field <> "") then
server_response = recaptcha_confirm(recaptcha_challenge_field, recaptcha_response_field)
newCaptcha = False
end if
%>
What happens here is the variables server_response and newCaptcha are set whenever the page is loaded, allowing you to determine the state of your page.
You can use the following HTML as a skeleton:
<html>
<body>
<% if server_response <> "" or newCaptcha then %>
<% if newCaptcha = False then %>
<!-- An error occurred -->
Wrong!
<% end if %>
<!-- Generating the form -->
<form action="recaptcha.asp" method="post">
<%=recaptcha_challenge_writer()%>
</form>
<% else %>
<!-- The solution was correct -->
Correct!
<%end if%>
</body>
</html>
As shown here:
http://developers.google.com/recaptcha/docs/asp

Error with FormatDateTime in VBscript

I am a running VB script with asp classic and I am getting the following error:
Microsoft VBScript runtime error '800a0005'
Invalid procedure call or argument: 'FormatDateTime'
/whatsnew/updated_pages_www.htm, line 52
I am trying to work out what is causing the error. Is there anything wrong with the format of the date in the csv file?
The date format is: 20090220122443
PAGE CODE BELOW:
<%#LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<% Response.CharSet = "UTF-8" %>
<%
pagetitle="What was published last week on casa.gov.au"
%>
<%
connectString = "Driver={Microsoft Text Driver (*.txt; *.csv)}; DBQ=" & Server.MapPath("/whatsnew/data")
set connect = Server.CreateObject("ADODB.connection")
connect.open connectString
selectSQL = "SELECT * FROM www.csv"
set www_RS = connect.execute(selectSQL)
%>
<!--#INCLUDE VIRTUAL="/_lib/include/header.htm"-->
<!--#INCLUDE VIRTUAL="/_lib/include/menu.htm"-->
<p class="breadCrm">Home <span>></span> What's New</p>
<!--<img src="/_lib/images/menu/yourarea.gif" alt="" width="891" /> -->
<div class="twoColumnRow">
<div class="twoColumnContent">
<div class="contentPad">
<!-- Start of main content -->
<p class="imageRight"> </p>
<h1><%=pagetitle%></h1>
<%
www_RS.MoveFirst
%>
<caption><h3>New or Amended on www.casa.gov.au</h3></caption>
<ul class="relatedInfoLinks">
<%
Dim pagecode, pagecode2, newfiledate, publisheddate, moddate, createddate, newfilediff, recently_published
pagecode = www_RS("PAGECODE").Value
While not www_RS.EOF
pagecode = www_RS("PAGECODE").Value
pagecode2 = Instr(pagecode,"PC_")
pagecode3 = Instr(pagecode,"~")
createddate = FormatDateTime(www_RS("CREATED_DATE").Value,1)
moddate = FormatDateTime(www_RS("MOD_DATE").Value,1)
publisheddate = FormatDateTime(www_RS("PUB_DATE").Value,1)
newfilediff = DateDiff("y",www_RS("CREATED_DATE").Value,www_RS("PUB_DATE").Value)
recently_published = DateDiff("y",www_RS("PUB_DATE").Value,dtNow)
if (pagecode2 = 1) and (pagecode3 = 0) and (recently_published < 8) then
%>
<li>
<%
Response.Write("<a href='http://casa.gov.au/scripts/nc.dll?WCMS:STANDARD::pc=" & pagecode & "'>" & www_RS("DESCRIPTION").Value & "</a>")
%>
<BR>
Last modified <%=publisheddate%>
<BR>
<%
if newfilediff < 8 then
%>
<span style="color:red">* This is a new page</span>
<%
end if
%>
</li>
<BR>
<%
end if
www_RS.MoveNext
Wend
%>
</ul>
<!-- End of main content -->
</div> <!-- end contentPad div -->
</div> <!-- end twocolumncontent div -->
<div class="twoColumnLinks">
<!--#INCLUDE VIRTUAL="/_lib/include/quicklinks.htm"-->
<!--#INCLUDE VIRTUAL="/_lib/include/mylinks.htm"-->
</div> <!-- end twocolumnlinks div -->
</div> <!-- end twocolumnrow div -->
<!--#INCLUDE VIRTUAL="/_lib/include/footer.htm"-->
The FormatDateTime function requires a validly formatted date as the first parameter.
Depending on the date/time format used in your location, it will be something like this (example: US date format):
"02-20-2009 11:24:43 AM"
"02/20/2009 11:24:43 AM"
"02-20-2009 14:24:43"
"02/20/2009 14:24:43"
As a test, you can check the validity of a date like this:
d = CDate("02-20-2009 11:24:43 AM")
d = CDate("02/20/2009 11:24:43 AM")
d = CDate("02-20-2009 14:24:43")
d = CDate("02/20/2009 14:24:43")
Or, using IsDate:
b = IsDate("02-20-2009 11:24:43 AM")
b = IsDate("02/20/2009 11:24:43 AM")
b = IsDate("02-20-2009 14:24:43")
b = IsDate("02/20/2009 14:24:43")
In your case, your date string: "20090220122443" is a valid date/time, but it is not in a valid date/time format.
You could use a function to convert your date string into a valid format. Here is an example of some code to do the conversion.
strDate = "20090220122443"
wscript.echo "strConvertDateString(strDate) =" & strConvertDateString(strDate)
wscript.echo "dateConvertDateString(strDate)=" & dateConvertDateString(strDate)
wscript.echo
wscript.echo FormatDateTime(strConvertDateString(strDate),1)
wscript.echo FormatDateTime(dateConvertDateString(strDate),1)
wscript.echo
Function strConvertDateString (strDateString)
strConvertDateString = mid(strDateString,5,2) & "/" & mid(strDateString,7,2) & "/" & mid(strDateString,1,4) & " " & mid(strDateString,9,2) & ":" & mid(strDateString,11,2) & ":" & mid(strDateString,13,2)
End Function
Function dateConvertDateString (strDateString)
dateConvertDateString = CDate(mid(strDateString,5,2) & "/" & mid(strDateString,7,2) & "/" & mid(strDateString,1,4) & " " & mid(strDateString,9,2) & ":" & mid(strDateString,11,2) & ":" & mid(strDateString,13,2))
End Function
The function strConvertDateString accepts a date/time string in your format and returns a string in a format acceptable to the FormatDateTime function.
The function dateConvertDateString accepts a date/time string in your format and returns a date (CDate), which is also acceptable to the FormatDateTime function.
The first one should work in most locations. The second might work better if there are issues with date conversions particular to your location. You should only need to implement and use one of these two functions.
In any case, depending on your location, you may need to edit the functions to adjust the way that mid() is used to compose the date/time string.
Note: This was written for testing in VBScript (cscript.exe). Copy/cut/paste the Function into your .asp file for use. Then use the function like this:
createddate = FormatDateTime(dateConvertDateString(www_RS("CREATED_DATE").Value),1)
Edit:
Here is a more detailed explaination of how to add this function to your .asp page and how to use the function.
First, you need to add the function to your ASP page.
Edit your page.
Normally, function declarations are placed inside the <head> section like this:
<html>
<head>
...
...
<%
Function dateConvertDateString (strDateString)
dateConvertDateString = CDate(mid(strDateString,5,2) & "/" & mid(strDateString,7,2) & "/" & mid(strDateString,1,4) & " " & mid(strDateString,9,2) & ":" & mid(strDateString,11,2) & ":" & mid(strDateString,13,2))
End Function
%>
</head>
<body>
...
<!-- there will be more <html> or <% asp code %> here ... -->
Or, inside the <body> section like this:
<html>
<head>
...
...
</head>
<body>
<%
Function dateConvertDateString (strDateString)
dateConvertDateString = CDate(mid(strDateString,5,2) & "/" & mid(strDateString,7,2) & "/" & mid(strDateString,1,4) & " " & mid(strDateString,9,2) & ":" & mid(strDateString,11,2) & ":" & mid(strDateString,13,2))
End Function
%>
...
<!-- there will be more <html> or <% asp code %> here ... -->
In your case, it looks like the sections of the page that contain the <html>, <head>, </head>, and <body> tags could be contained in the included files. You can verify that by examining the files:
"/_lib/include/header.htm"
"/_lib/include/menu.htm"
So, in your case, you'll want to insert the function declaration into your page after the <!--#INCLUDE VIRTUAL= lines, like:
<!--#INCLUDE VIRTUAL="/_lib/include/header.htm"-->
<!--#INCLUDE VIRTUAL="/_lib/include/menu.htm"-->
<%
Function dateConvertDateString (strDateString)
dateConvertDateString = CDate(mid(strDateString,5,2) & "/" & mid(strDateString,7,2) & "/" & mid(strDateString,1,4) & " " & mid(strDateString,9,2) & ":" & mid(strDateString,11,2) & ":" & mid(strDateString,13,2))
End Function
%>
Or, you could probably insert the function declaration into one of these files:
"/_lib/include/header.htm"
"/_lib/include/menu.htm"
Next, find the statements that are using VBScript date functions where you are currently passing dates formatted like this: "20090220122443"
That would be (most likely) all of these:
createddate = FormatDateTime(www_RS("CREATED_DATE").Value,1)
moddate = FormatDateTime(www_RS("MOD_DATE").Value,1)
publisheddate = FormatDateTime(www_RS("PUB_DATE").Value,1)
newfilediff = DateDiff("y",www_RS("CREATED_DATE").Value,www_RS("PUB_DATE").Value)
recently_published = DateDiff("y",www_RS("PUB_DATE").Value,dtNow)
and edit those statements to use the function to convert the dates, like this:
createddate = FormatDateTime(dateConvertDateString(www_RS("CREATED_DATE").Value),1)
createddate = FormatDateTime(dateConvertDateString(www_RS("CREATED_DATE").Value),1)
moddate = FormatDateTime(dateConvertDateString(www_RS("MOD_DATE").Value),1)
publisheddate = FormatDateTime(dateConvertDateString(www_RS("PUB_DATE").Value),1)
newfilediff = DateDiff("y",dateConvertDateString(www_RS("CREATED_DATE").Value),dateConvertDateString(www_RS("PUB_DATE").Value))
recently_published = DateDiff("y",dateConvertDateString(www_RS("PUB_DATE").Value),dtNow)
So, if the code you provided in your question is still correct and complete, here is the same code using the date conversion function:
<%#LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<% Response.CharSet = "UTF-8" %>
<%
pagetitle="What was published last week on casa.gov.au"
%>
<%
connectString = "Driver={Microsoft Text Driver (*.txt; *.csv)}; DBQ=" & Server.MapPath("/whatsnew/data")
set connect = Server.CreateObject("ADODB.connection")
connect.open connectString
selectSQL = "SELECT * FROM www.csv"
set www_RS = connect.execute(selectSQL)
%>
<!--#INCLUDE VIRTUAL="/_lib/include/header.htm"-->
<!--#INCLUDE VIRTUAL="/_lib/include/menu.htm"-->
<%
Function dateConvertDateString (strDateString)
dateConvertDateString = CDate(mid(strDateString,5,2) & "/" & mid(strDateString,7,2) & "/" & mid(strDateString,1,4) & " " & mid(strDateString,9,2) & ":" & mid(strDateString,11,2) & ":" & mid(strDateString,13,2))
End Function
%>
<p class="breadCrm">Home <span>></span> What's New</p>
<!--<img src="/_lib/images/menu/yourarea.gif" alt="" width="891" /> -->
<div class="twoColumnRow">
<div class="twoColumnContent">
<div class="contentPad">
<!-- Start of main content -->
<p class="imageRight"> </p>
<h1><%=pagetitle%></h1>
<%
www_RS.MoveFirst
%>
<caption><h3>New or Amended on www.casa.gov.au</h3></caption>
<ul class="relatedInfoLinks">
<%
Dim pagecode, pagecode2, newfiledate, publisheddate, moddate, createddate, newfilediff, recently_published
pagecode = www_RS("PAGECODE").Value
While not www_RS.EOF
pagecode = www_RS("PAGECODE").Value
pagecode2 = Instr(pagecode,"PC_")
pagecode3 = Instr(pagecode,"~")
createddate = FormatDateTime(dateConvertDateString(www_RS("CREATED_DATE").Value),1)
createddate = FormatDateTime(dateConvertDateString(www_RS("CREATED_DATE").Value),1)
moddate = FormatDateTime(dateConvertDateString(www_RS("MOD_DATE").Value),1)
publisheddate = FormatDateTime(dateConvertDateString(www_RS("PUB_DATE").Value),1)
newfilediff = DateDiff("y",dateConvertDateString(www_RS("CREATED_DATE").Value),dateConvertDateString(www_RS("PUB_DATE").Value))
recently_published = DateDiff("y",dateConvertDateString(www_RS("PUB_DATE").Value),dtNow)
if (pagecode2 = 1) and (pagecode3 = 0) and (recently_published < 8) then
%>
<li>
<%
Response.Write("<a href='http://casa.gov.au/scripts/nc.dll?WCMS:STANDARD::pc=" & pagecode & "'>" & www_RS("DESCRIPTION").Value & "</a>")
%>
<BR>
Last modified <%=publisheddate%>
<BR>
<%
if newfilediff < 8 then
%>
<span style="color:red">* This is a new page</span>
<%
end if
%>
</li>
<BR>
<%
end if
www_RS.MoveNext
Wend
%>
</ul>
<!-- End of main content -->
</div> <!-- end contentPad div -->
</div> <!-- end twocolumncontent div -->
<div class="twoColumnLinks">
<!--#INCLUDE VIRTUAL="/_lib/include/quicklinks.htm"-->
<!--#INCLUDE VIRTUAL="/_lib/include/mylinks.htm"-->
</div> <!-- end twocolumnlinks div -->
</div> <!-- end twocolumnrow div -->
<!--#INCLUDE VIRTUAL="/_lib/include/footer.htm"-->
To give this a try, copy your current .htm file to something like whatever.htm. Then, replace (or edit) your current .htm with the code above.
Unfortunately, I don't have a way to test your complete ASP page.
If you still have problems with this, it would be very helpful if you could provide a copy of your actual .htm file, and a copy of the files: /_lib/include/header.htm, and /_lib/include/menu.htm

Syntax html in asp.net + vb.net

This my code
Dim verifyUrl As String = Request.Url.GetLeftPart(UriPartial.Authority) & Page.ResolveUrl("~/verify.aspx?ID=" & sGUID)
mail.Body = "<html>" & _
"<head>" & _
"<meta http-equiv=""Content-Language"" content=""fr"">" & _
"<meta http-equiv=""Content-Type"" content=""text/html; charset=windows-1252"">" & _
"</head>" & _
"<body>" & _
" <p>Hello, <%UserName%>. You are receiving this email because you recently created a new account at my" & _
"site. Before you can login, however, you need to first visit the following link:</p>" & _
"<p> //////Here put an href whit the value verifyUrl ///// </p>" & _
"</body>" & _
"</html>"
mail.Body = mail.Body.Replace("<%VerifyUrl%>", verifyUrl)
mail.Body = mail.Body.Replace("<%UserName%>", nom)
Try for long time to put an like <a href"<%verifyUrl%>"</a> but this not work well................
Please help me to enter this simple html line!!!
Thanks in advance!!
You can use this:
<a href='<%VerifyUrl%>'>Click Here</a>

Resources