473,651 Members | 2,582 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

embed HTML table using VB

I am showing a table in a web page, I need help to email this table,
please any sugestion ....? thanks!!

Oct 5 '06 #1
3 2731
Sending html emails is as simple as the code below:

<% @Page Language="C#" %>
<% @Import Namespace="Syst em.Web.Mail" %>
<%
MailMessage msgMail = new MailMessage();
msgMail.To = "blah";
msgMail.Cc = "blah blah";
msgMail.From = "blah";
msgMail.Subject = "the subject text";

msgMail.BodyFor mat = MailFormat.Html ;
string strBody = "<html><body><b >Hello World</b>" + " <font
color=\"red\">A SP.NET</font></body></html>";
msgMail.Body = strBody;

SmtpMail.Send(m sgMail);

%>

If your table however is within an asp.net page you'll have to acquire it as
a string that can be included as the html body of the mail. I would suggest
you take a read of this little snippet by Rick Strahl that explians
capturing output from a rendered web page.

http://www.johntimney.com/home/redir...posts/481.aspx

You'll then need to work out how to pick out your table if thats all you
require.

--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com

"Aur_Ros" <au*****@hotmai l.comwrote in message
news:11******** **************@ b28g2000cwb.goo glegroups.com.. .
I am showing a table in a web page, I need help to email this table,
please any sugestion ....? thanks!!

Oct 5 '06 #2
thanks a lot John!!, yes that is what I need to do, I need to Know how
to get HTML code of that table created dynamically in the web page !!

John Timney (MVP) wrote:
Sending html emails is as simple as the code below:

<% @Page Language="C#" %>
<% @Import Namespace="Syst em.Web.Mail" %>
<%
MailMessage msgMail = new MailMessage();
msgMail.To = "blah";
msgMail.Cc = "blah blah";
msgMail.From = "blah";
msgMail.Subject = "the subject text";

msgMail.BodyFor mat = MailFormat.Html ;
string strBody = "<html><body><b >Hello World</b>" + " <font
color=\"red\">A SP.NET</font></body></html>";
msgMail.Body = strBody;

SmtpMail.Send(m sgMail);

%>

If your table however is within an asp.net page you'll have to acquire it as
a string that can be included as the html body of the mail. I would suggest
you take a read of this little snippet by Rick Strahl that explians
capturing output from a rendered web page.

http://www.johntimney.com/home/redir...posts/481.aspx

You'll then need to work out how to pick out your table if thats all you
require.

--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com

"Aur_Ros" <au*****@hotmai l.comwrote in message
news:11******** **************@ b28g2000cwb.goo glegroups.com.. .
I am showing a table in a web page, I need help to email this table,
please any sugestion ....? thanks!!
Oct 5 '06 #3
The easiest way is usually to mark the table, by surrounding it with custom
tags !<--tablestarts-!<--tableends- then crop the string captured in the
render event using ther .net string methods.

or if yor doing it client side then wrap your table with a specific div
identifier and use javascripts innerHTML method and then post it to a page
that will invoke your mail method.

<div id= "myTable">T his is my table.</div>

something like : document.getEle mentId("myTable ").innerHTM L .

--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
"Aur_Ros" <au*****@hotmai l.comwrote in message
news:11******** **************@ c28g2000cwb.goo glegroups.com.. .
thanks a lot John!!, yes that is what I need to do, I need to Know how
to get HTML code of that table created dynamically in the web page !!

John Timney (MVP) wrote:
>Sending html emails is as simple as the code below:

<% @Page Language="C#" %>
<% @Import Namespace="Syst em.Web.Mail" %>
<%
MailMessage msgMail = new MailMessage();
msgMail.To = "blah";
msgMail.Cc = "blah blah";
msgMail.From = "blah";
msgMail.Subjec t = "the subject text";

msgMail.BodyFo rmat = MailFormat.Html ;
string strBody = "<html><body><b >Hello World</b>" + " <font
color=\"red\"> ASP.NET</font></body></html>";
msgMail.Body = strBody;

SmtpMail.Send( msgMail);

%>

If your table however is within an asp.net page you'll have to acquire it
as
a string that can be included as the html body of the mail. I would
suggest
you take a read of this little snippet by Rick Strahl that explians
capturing output from a rendered web page.

http://www.johntimney.com/home/redir...posts/481.aspx

You'll then need to work out how to pick out your table if thats all you
require.

--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com

"Aur_Ros" <au*****@hotmai l.comwrote in message
news:11******* *************** @b28g2000cwb.go oglegroups.com. ..
I am showing a table in a web page, I need help to email this table,
please any sugestion ....? thanks!!

Oct 5 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
4488
by: Anna | last post by:
Hi all. I want to embed the EMBED tag in the object tag. I understood that I need to provide a PARAM tag inside the OBJECT whose value will hold the content of EMBED src attribute, but after that I've got confused. For example, what should be put into classid and codebase attributes of the OBJECT now embedding the EMBED tag?
4
3408
by: AES/newspost | last post by:
Can anyone provide a quick tip on the html structure to link from a thumb to a movie poster and from there on to a QuickTime movie, all in one go, using EMBED? I have a number of (large) QuickTime movie files, each of them matched to a one-frame QuickTime movie poster of the same screen size and also to a much smaller JPEG thumb of the same image as the movie poster. I want to put the small thumbs into individual Table cells to serve...
4
82461
by: Pawel | last post by:
Hello All I tried to embed Excel sheet into HTML page by following command: <iframe src="Tmp.XLS" width="100%" height="500"></iframe> and it works, showing Excel sheet inside the page, but there is no way I can save the Excel sheet after it has been change. The Excel menu is not active and the system is not asking whether I want to save the changes or not.
1
2974
by: Andrew Poulos | last post by:
With "normal" SWF HTML there's an EMBED tag nested within an OBJECT tag. How can I check which tag is actually displaying the SWF? I'm using CSS on them and the style on the OBJECT affects the EMBED tag so I'm going to use some code to correct it but I can't tell which tag is responsible for the display. Andrew Poulos
4
4271
by: csgraham74 | last post by:
Ok - i was wondering if someone could help me. im basically trying to embed an html string in piece of XML. i created an xsl and added the CDATA into the xml around the html i wish to render. In my calling page i create an XML data island (excuse the terminology as im new to this stuff) to pull in the xml fields and to hopefully render the html as xml (see Details node ) . Unfortunately this doesnt work and it just displays as a...
13
2644
by: windsorben | last post by:
I have some javascript that checks whether or not an answer is correct. It was working fine when the question was asked with text but now that I'm asking the question with audio, the javascript no longer works. (I think it is considering the embed tag as an element in my form and I think that's causing the problem.) I think adding and specifying to only look at a div tag within the form would solve the problem but I'm not sure. Can someone...
1
2054
by: Kaysetoaster | last post by:
Hi Coding-Gurus :) I hope you can help me:) I'm trying to embed my VB.NET usercontrol into a HTML document. I builded one that returns some HTML code. When I call it on the body's event "onload" it says the object doesn't support the attribute or method. Please help me :) Whats going wrong? When I debug the VB.Net control everything works fine. //Getting HTMLCode for the table //called on body's onload event: function getTable()
3
3141
by: helraizer1 | last post by:
I have this code in JS function show_player() { document.mediaplayer1.style.visibility = "visible"; } function content(p, clip) { var mus = document.getElementById('music'); mus.style.visibility = "visible";
2
8068
dream party
by: dream party | last post by:
Inserting a Flash (SWF, FLV) file into HTML web page is already an old and familiar thing to all of us. It is a rather non-flexible thing that just to edit some options in the template. However, I did not understand some parameters totally in the HTML tag. These days when I was surfing the Internet I have found some comprehensive introduction to these two tags. I read it and conclude it with my own words; I think it will be useful to us, so I...
0
8275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8694
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8571
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7294
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6157
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4143
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4280
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2696
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1905
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.