Salah a a a Al Jasem
asked on
How to get the currently displayed page text, tags, script ..... in a string to be used for email body
Asp.net
Vb.net
A page with a list of transaction is loaded
A textbox
A command button
The visitor enters the email in the textbox and clicks the command button, as a result the currently displayed page is sent to the entered email
How to get the currently displayed page text, tags, script ..... in a string to be used for email body
The code is
Dim smtp As New System.Net.Mail.SmtpClient ()
Dim smail As New System.Net.Mail.MailMessag e
smail.To.Add(New System.Net.Mail.MailAddres s(TextBox1 .Text))
smail.From = New System.Net.Mail.MailAddres s("MyEmail @gmail.com ", "subject")
smail.Subject = "Subject"
smail.IsBodyHtml = "true"
smail.Body = (this part is needed)
smtp.EnableSsl = True
smtp.Send(smail)
Thanks
Vb.net
A page with a list of transaction is loaded
A textbox
A command button
The visitor enters the email in the textbox and clicks the command button, as a result the currently displayed page is sent to the entered email
How to get the currently displayed page text, tags, script ..... in a string to be used for email body
The code is
Dim smtp As New System.Net.Mail.SmtpClient
Dim smail As New System.Net.Mail.MailMessag
smail.To.Add(New System.Net.Mail.MailAddres
smail.From = New System.Net.Mail.MailAddres
smail.Subject = "Subject"
smail.IsBodyHtml = "true"
smail.Body = (this part is needed)
smtp.EnableSsl = True
smtp.Send(smail)
Thanks
A page with a list of transaction is loaded into what a datagridview what? Can't read your mind here.
ASKER
It is a web page
by saying (is loaded) I am avoiding answers that sends email once the page is loaded.
I am trying so say, the page is in front of the visitor with the following items
A classic table with a list of transaction
A textbox
A command button
I need to get all tags and text in the page (as is) to be used in the email body
right now I am redesigning the body, which is not a good way
Thanks for trying to help
by saying (is loaded) I am avoiding answers that sends email once the page is loaded.
I am trying so say, the page is in front of the visitor with the following items
A classic table with a list of transaction
A textbox
A command button
I need to get all tags and text in the page (as is) to be used in the email body
right now I am redesigning the body, which is not a good way
Thanks for trying to help
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I have tried you solution and I get the following Compile error
BC30506: Handles clause requires a WithEvents variable defined in the containing type or one of its base types
On the following line
Protected Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
BC30506: Handles clause requires a WithEvents variable defined in the containing type or one of its base types
On the following line
Protected Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
ASKER
sorry the last reply from me was not right
Mr. Ark Your code is working perfect
Mr. Ark Your code is working perfect
ASKER
Thank you Mr. David
Thank you Mr. Ark
For helping me
Thank you Mr. Ark
For helping me