i need to write html code using asp . it's works fine . but how can i reading variable in the coding???following is my coding <% Dim HTML dim x x = "abcdefg" HTML = "<!DOCTYPE HTML PUBLIC""-//IETF//DTD HTML//EN"">" HTML = HTML & "<html>" HTML = HTML & "<head>" HTML = HTML & "<meta http-equiv=""Content-Type""" HTML = HTML & "content=""text/html; charset=iso-8859-1"">" HTML = HTML & "<meta name=""GENERATOR""" HTML = HTML & " content=""Microsoft Visual Studio 6.0"">" HTML = HTML & "<title>HTML</title>" HTML = HTML & "</head>" HTML = HTML & "<body bgcolor=""FFFFFF"">" HTML = HTML & "<table width=""699"" border=""2"" align=""center"" cellpadding=""0"" cellspacing=""0"">" HTML = HTML & " <tr align=""center"" valign=""top"">" HTML = HTML & " <td width=""29%"" rowspan=""8""><div align=""right""><img src=""ace.jpg"" alt=""ace"" width=""159"" height=""158""></div></td>" HTML = HTML & " <td height=""22""> " HTML = HTML & " </td>" HTML = HTML & " </TABLE>" HTML = HTML & "Testing data Header</strong></p>" HTML = HTML & "<p><font size =""2"" face=""Tahoma"">" HTML = HTML & "Testing Address<br>" HTML = HTML & "Testing Address2.</p>" HTML = HTML & "</body>" HTML = HTML & "</html>" %> how can i insert my variable to it. or session .. Please help . thanks
To put the variable into session do the following : Session("whatever") = HTML replacing "whatever" with your desired session variable name to output the contents on the variable do the following : Response.Write(HTML) cheers, dave.
I think jgarrison gave you what your looking for. I would also say replace HTML = HTML & "example" with HTML += "example" It is a lot cleaner and does the same thing.
you may use function() instead of using lots of [ HTML = HTML & ] then you do not worry how to put Variable any more