Link to home
Start Free TrialLog in
Avatar of pamela rizk
pamela rizkFlag for Lebanon

asked on

webform in website project using dreamweaver

dear All
i have teh below code:
[code]<%@ Page Language="vb"  AutoEventWireup="false" debug = "true" %>
<%@ Import Namespace="System.Web.Mail" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">
<title>Send Email</title>
 <!--Added by pamela for analytics instructions added to every page that needs to be tracked-->
	<script>
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
    
      ga('create', 'UA-64675694-1', 'auto');
      ga('send', 'pageview');
    
    </script>
 <!--End by pamela-->
</head>
<script language="VB" runat="server">
    
    Sub Page_Load(ByVal Sender As Object, ByVal E As EventArgs) Handles Me.Load
        
        Dim msg As New MailMessage()
        msg.To =request.form("txtto")
        msg.From =  "sales@aims-co.com"
        msg.Subject = request.form("txtsubject")
        msg.Body =  request.form("txtbody")
        SmtpMail.SmtpServer = "smtp.cyberia.net.lb"
        SmtpMail.Send(msg)
        msg = Nothing
        lblMsg.Text ="Your Request has been sent.Please check your Email for a link to Download."
     
     End Sub
</script>

<body style="font: 10pt verdana">
<form id="Form1" runat=server>
 <asp:Label runat="server"  id="lblMsg"></asp:Label>
    <br />
    <a href="index.html">Go to home page </a>
 </form>
</body>
</html>

Open in new window

[/code]
where i am getting the below errror message
This page contains the following errors:

error on line 1 at column 2: StartTag: invalid element name
Below is a rendering of the page up to the first error.
how to solve it
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Looks ok to run in my environment.

User generated imagedo you have IIS installed and properly run in your system? Did you map your aspx page into correct directory?
Avatar of pamela rizk

ASKER

yes i have
how can i solvethis issue
i have a dreamweaver project where i am opening the code already sent and upon pressing F12 Issue appear please helpp
i have a dreamweaver project where i am opening the code already sent and upon pressing F12 Issue appear please helpp
You can't preview an aspx like what you preview a normal HTML page using F12 in DW.

you need to first compile your aspx pages, and then In your IIS, create a website/ application/ virtual path to show your aspx pages.

For the ease of troubleshooting, why don't you install the Visual Studio? you can download it from MSDN.
https://www.visualstudio.com/downloads/
i have a virtual directory where teh website is published byt upon running the pagethe source code will be shown instead of the design
I'm not really using DW to develop ASPX pages, so probably I can't help much but to provide you alternative solution of using Visual Studio.

If you're still keen and trying to resolve it in DW, you may try have a look on these articles:

Using ASP and ASP.NET with Dreamweaver
https://www.lynda.com/Dreamweaver-tutorials/Using-ASP-ASP-NET-Dreamweaver/705/42332-4.html

Developing ASP.NET Applications with Macromedia's Dreamweaver MX 2004
http://www.adobepress.com/articles/article.asp?p=409338
ok any news
sorry as I don't have DW installed in my local environment that I can't simulate the issue you're encountered.
ok so i will wait until i get an answer
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.