.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Bind Gridview into Email Message Body

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :ASP.Net


      I have a gridview in a webpage. How can I convert into an EMail message body(of either a Textbox named Text Message). I want to mail this gridview to someone. Is there any simple way to do this.

      So can anybody please hel me in this regard.


View Complete Post

More Related Resource Links

Sending GridView in Email Message



How can I send GridView in Email Message.



How to bind GridView and DropDownList controls using DataTable object

In .net framework 2.0, you can load a DataTable in memory by consuming a data source using a DataReader. In this version you will find the flexibility in accessing the DataReader means write access code once and use again and again using DataReader. To see the functionality of DataTable consider an example that is created using VS2005.

Change data on gridview bind


Hi there,

Simple little problem. i have a gridview that shows products assigned to a customers job. They are displayed in exVAT prices. To make it easier i want to show the inc VAT prices. How can i add VAT to 1 column in this table?

need regular expression to get message body

I have text like this: <tr class="NormalRow_Small"> <td colspan=2>&nbsp;</td> <td colspan=3> </td> </tr> <tr class="NormalRow_Small"> <!--description--> <td colspan="5"> <font size="2">Hi All,<div><!br /></div><div>I'm glad to introduce ...</div><div><!br /></div><div>Actually we already have ... <font size=1>(see link for full text)</font></font><br> <font size="1"> </td> </tr> <tr> <td colspan=5><hr /></td> </tr>   I want to get bold text, please help me.   Thanks, Alex.

Best regex for email body on contact form?

I'm not sure the best way to do a regex for the body section of an email contact form.  I want to use the regex to prevent more than 150 characters from being entered.  I assume this is sufficient, I may need more.  I also want it to help guard against sql injection attacks. The more I think about it the more characters I can think of that should be allowed.  I want to allow punctuation since it's for an email and people should be using full sentences.  These are some other things that make sense to allow: " , ', : , ; , $ , . , ! , ? , - , _ , @ , & , ( , ). They cover situations when someone may put an email address or phone number in the body section for the email.  I also want to allow letters and numbers.    I'm not sure if it's best to allow the characters I mentioned or not allow characters that pose a potential threat.  I think allowing the ones I want is the best way, but I'm not sure.  Can someone please give an example and/or suggestions?  Are there other characters that should be allowed?  I don't have much yet: "^(?i)[a-z0-9\s]{1,150}$"

email to each record in gridview

I have a gridview that is populated from a selection made from a DropDown list box. I would like to click a check box then send an email to each record in the gridview. Could someone offer some solid help on how to do this?       Thank you for your input.

SQL Server Tables and Exchange Web Services sample does not include email body

I've sucessfuly implemented the above, very useful example. However, I cannot work out how to include the Body of the email with the reast of the data. Can anyone shed some light for me? Thanks Robert

Immediate alert email body is truncated intermittently in MOSS 2007

Hi All, I  am facing one issue with Alert. We have one Posts list in one of the Blog where Alert Me generates immediate alert for the users who have subscribed to the Blogs. Whenever any new Post added, edited or deleted they used to get alerts. But in the alert email, the body of the alert which normally contains the Post decsription gets truncated intermittently. Sometimes it is truncated with less than 2048 characters in the Body filed and some times with more than 4098 characters. I found in some articles that the limitation is 2048 characters in one line after whcih the new line is expected , else the text will be truncated. I am not able to find the logic behind this truncation in default sharepoint alert functionality. Could you please give some more insights on this front? Thnaks:)  

Gridview and delete option - Button click displays message

Hi, I have a gridview connected to a sql database that allows the user to delete the record. I used the ASP.net automatic "options" for this. However, I would like when the user deletes a record, a message (textbox) appears in the form to say the record has been deleted. Please can anyone provide some sample codes?   Thanks in advance. Nijojo.

Bind List&lt;&gt; to GridView

Can any body help how to update list through gridview

How do I add additional information to email message

I have a contact form that has the standard email fields such as name, email, street address, city, state, and body.  This is being done with System.Net.Mail.  I understand how to use the body, to/from address, and subject.  I don't understand how to include the street address, city, and state with the email though.  I want this additional information to be sent with the email some how so the recipient can have access to it.  I assume this should be included with the body when the email is sent.  I don't understand the best way to so this though.  I thought about appending the values of these fields to the body of the email.  I don't know how to format this so it looks good though.  The formatting I want to do is very basic.  I would like each of these values to be on a separate line before or after the body of the email.  I'm not interested in colors or anything too fancy.   I prefer to send a plain text email, if possible, if these values can be included on their own line.Can anyone provide an example or a link to an article on this?  Do I have to use an html formatted email and create new lines with in the body for these fields?

Link in email message is not working through WebMail

Hi, I have used below link in email message using Start Approval process action in SharePoint 2010, this link highlighting with blue color  when i open Outllok and I am able to click on it as shown below.When i looged in using webmail from outside this link is not highlighting and unable to click on it. http://sharepointdev/CapComApprovalForm/_layouts/WrkTaskIP.aspx?ID=569&List=32db4bbb-cdff-4366-9758-f6ab75300061 Please hep me out to open this link through webmail by clicking on it. Thanks in Advanace. -Bassu

Show Please Wait... message on loading GridView.

Hi All. I wants to show Please Wait... message on loading GridView. I am not using ajax. The Please Wait... should come above the GridView. On combobox value change the gridview binds with new value. On every binding i wants to show the Please Wait... above the gridview.   Thanks.

Build chart bar with asp.net (bind from gridview)

Build chart bar with asp.net (bind from gridview)Please guide to there with vb code.

read delimited files into a datatable and bind to a gridview

I have a delimted file , like a csv file but the delimters are # and not ,I assume I would use SqlConnection and SqlDataAdapterSo for a csv file what is the sequence to read in for example c:\data\demo.csvWhat would the connection string be.Also can you specifiy a different delimiter.The code below is what I assume it would possibly look likea although its only a frst guess. ThanksJim Dim connectionString As String = "Data Source=localhost;Initial Catalog=master;Integrated Security=true;" Dim con As New SqlConnection(ConfigurationManager.ConnectionStrings("Northwind_ConnectionString").ConnectionString) Dim str As String = "SELECT * FROM Employees" Dim cmd As New SqlCommand(str, con) Dim da As New SqlDataAdapter(cmd) Dim dt As New DataTable() da.Fill(dt) GridView1.DataSource = dt GridView1.DataBind()

Parsing the email body content in a SPEmailEventReceiver class

Hi All, 1. I have an email enabled Sharepoint list which have certain fields like Fname,Lname,Address,Phonenumber   2. Someone will send an email to this list   the email body like this   Fname: Mohammed Lname:Hanif Adress:CA Phonenumber:001234   Now i have to read this body and create a new item in this List where the list fields value will be like this Fname: Mohammed Lname:Hanif Address:CA Phonenumber:001234 Created BY: Email Sender   I can parse the subject and sender to list columns but my problem is to read the content of the Email Body identify the Field value and copy it to corresponding List Fields.   Any help is much appreciated. Regards, Hanif Hanif

Dropdown select message in item template gridview dropdwon list ???

Hi ....I have used gridview item template , which has two dropdown list .The first dropdown list is binded from database to the dropdown list I have using the below code , to show the select message in dropdown list before selecting any item from dropdown list.In first row its show me --Select-- message and my vaues.. if i select some value form dropdownlist and click add new button it will create a new row dynamic then in previous row again it come back --Select-- message... on going to second row....I need to remain first row user selected value on going to next row.The New row will show --select-- message..Please go to my code and let me know what to do<asp:DropDownList id="DropDonList2" tabIndex=11 runat="server"          OnSelectedIndexChanged="DropDonList2_SelectedIndexChanged" AutoPostBack="True"          DataTextField="SizeRange" DataValueField="SizeRange"          OnDataBound="DropDonList2_DataBound" __designer:wfdid="w10"          AppendDataBoundItems="True">  <asp:ListItem Value="-1">Select</asp:ListItem> </asp:DropDownList><asp:DropDownList id="DropDonList2" tabIndex=11 runat="server" 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend