|
if the data is from a dataset or database, dump it to xml and apply an xsltranform to it then email the resulting html page.
otherwise iterate all form controls and create a plain text or html document then email it.
hope that helps,
g00fy
|
|
|
|
|
You can build a string with all the information you want to send and use the System.Web.Mail namespace to send a mail containing the string ?
My Blog
|
|
|
|
|
Can u show me some sample codes to go about doing it?
What can i put here, MailMessage.Body = ?
How do i send all the multiple values from different textboxes to the body of an email?
Currently, i have inserted a asp:panel in my webform with all the textboxes in it, how can i add the panel of stuff into the MailMessage.Body?
frossie
|
|
|
|
|
You create something to hold the value. One way can be this :
<br />
StringBuilder sb = new StringBuilder();<br />
sb.Append(TextBox1.Text + ", " + TextBox2.Text);<br />
Then you put this into your MailMessage.Body property.
Another way would be to get the Html of your panel and put it into your MailMessage.Body with the BodyFormat set to Html.
My Blog
-- modified at 9:19 Monday 10th July, 2006
|
|
|
|
|
Thanks for the above codes.
But i would be more interested if you can further guide me on how to get the HTML of my panel to put it into my MailMessage.Body. By the way, i have already set the BodyFormat to HTML.
If u can, please show me a sample code? Thanks in advance.
frossie
|
|
|
|
|
|
Try:
<br />
message.Body = Panel.InnerHTML<br />
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
there will be an error if i put that sentence.
Cos it say that InnerHTML is not part of a panel control.
sigh.
frossie
|
|
|
|
|
Hello all,
This might be simple issue, but I am new in this.
I have a datagrid, and I am sending datagrid's row data to the javascript function on- onclick event using itembound property.(e.item...) I need to use that row data again on server side, (I need to identify, which row was clicked) for adding that row data to the client's outlook calendar.Basically, I have a list of appointments in datagrid.This is the first question.
Second, If anybody know, how to add, appointment to the MS-Outlook from asp.net(by javascript or serverside code) please help me.
Thank you very much.
NIKI
|
|
|
|
|
Handle the datagrid events for row selection etc, no javascript needed.
|
|
|
|
|
Thank you Mark for your quick reply.
I already implemented the javascript functionality. I am using the javascript function to display the details for the selected appointment in the datagrid in some format. I need to use that javascript. Any idea, how i can add that appointment details to the ms-outlook?
Thanks
NIKI
|
|
|
|
|
Dhruvil wrote: I need to use that row data again on server side...This is the first question
Dhruvil wrote: I already implemented the javascript functionality.
Don't waste everyones time here by asking questions you don't need answered.
|
|
|
|
|
Hi Mark,
I am sorry for that.
I should wrote down complete things.
Actually, the javascript functionality I implemented is not for getting data from client side to the server side, but for sending data of datagrid row from serverside to client side using datagrid events.
If u want some more details, let me know.
I have data on client side, but for some funcionality, i need the data from client side to server side for the perticular datagrid row.
Thanks
NIKI
|
|
|
|
|
|
Hi
I have List of events in datagrid, in which i am showing only dates in the datagrid.when someone click on a row in datagrid, it will display the details for that date's event in tabular format using a javascript function on a same page.I have one hyperlink to add that details in the microsoft outlook. when some one click on that hyperlink, the displayed event will be added to the outlook.I am very confuse with this as I am implementing first time.
Thank you very much.
|
|
|
|
|
To add to outlook, you need to drive the object model. The difficulty will come if in an environment with Exchange SErver, which stores all this stuff centrally. If you're happy just to use the client's Outlook, then google for "Outlook Object Model"...there WILL be version issues as will all office object models however.
In terms of pushing data from the client to the server, the usual way to do this is with a postback (or AJAX if a postback is not desirable). Just post the form to the server, and ypu'll have access to all the bits you need.
(Though if you're feeling brave, you COULD do it all client side with some fairly heavy-duty Javascript!)
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
hi,
i am using sqlserver as backend.
how can i assure that two records are not same in the database.
|
|
|
|
|
Have a primary key.
"Today is a gift, That's why it is called the Present."
|
|
|
|
|
hi,
i appreciate ur answer.
but i does not want the text of the records to repeat.
not the number. ex:maharashtra should be there twice.
|
|
|
|
|
The answer is still, have a primary key
|
|
|
|
|
Not necessarilly - you can simply set a unique constraint on the column. That way, you don't need to f*** around with composite keys (assuming that the normal method of PKing the identifier col is being used)
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
You will need to do something like:
IF NOT EXISTS (SELECT Top 1 FROM Table Where name = 'maharashtra')
INSERT INTO Table (name) VALUES ('maharashtra')
"Half this game is ninety percent mental." - Yogi Berra
If you can read thank a teacher, if you can read in English, thank a Marine.
M y and h don't work so well due to m addiction to caffeine and m in abilit to to set a cup down uprigt.
|
|
|
|
|
hi
i am developing a web page in which i have datagrid having many coloumns now one column contain edit button after clicking that link or button the id(customer id first column) of that perticular row must be sent (append to url). how can i do this i am using VS2005
|
|
|
|
|
You just need to handle that edit event which you can do with itemcommand event of the datagrid.
Best Regards,
Apurva Kaushal
|
|
|
|
|
forit u can use CommandArgument,CommandName Property of the CommandButton.
just write pass the id of the customer into commandargument from aspx form. and the id in code file.
and pass this id as querystring into the
Response.Redirect()
i hope this may help u.
|
|
|
|