|
Hi ,
You can Reffer following articles for sending emails
http://www.aspsnippets.com/post/2009/02/01/Send-Email-using-CSharp.aspx
http://www.aspsnippets.com/post/2009/01/18/Send-Email-using-VBNet.aspx
Best Regards
|
|
|
|
|
see the code and implement.
SmtpClient sendMail = new SmtpClient();
string mFrom = txtfrom.Text;
string mTo = txtTo.Text;
string mSubject = txtSubject.Text;
string mBody = txtMsg.Text;
System.Net.Mail.MailMessage msg = new System.Net.Mail.MailMessage(mFrom, mTo, mSubject, mBody);
Attachment attach = new Attachment(fileAttach.PostedFile.FileName);
msg.Attachments.Add(attach);
sendMail.Host = "mail.ncodetechnologies.com";
sendMail.Send(msg);
lblMsgSent.Visible = true;
lblMsgSent.Text = "Message Sent";
Regards
Keyur Satyadev
|
|
|
|
|
when i was trying to move from loginpage to some another aspx page like adminindex.aspx page it is redirecting to the same login page. i used response.redirect as well as server.transfer in login button click event of loginpage
modified on Saturday, February 28, 2009 3:26 AM
|
|
|
|
|
aratireddy wrote: when i was trying to move from loginpage to some another page it is redirecting to the same login page i used response.redirect as well as server.transfer in login button click event of loginpage
In which page are your trying to redirect? Can you please put the line of code.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Hai ,
I am using checkboxes in a header templates and some checkboxes in item templates,if chkHeader is checked then all the chkitem are checked.code behind is used for this, these check boxes and one btndelete button is used for deletion,i want two javascript alert
for this delete button,delete button is outside of the grid , if any check box is not selected then i want to dispaly th e java scrip alert "please choose an item" otherwise i f any one checkbox is checked and click the delete button then i want to display "are u want to delete this item",please help me(asp.net, c#,ajax,javascript)
|
|
|
|
|
I think you are looking for something like This[^]
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Hai sir,
I am using checkboxes in a header templates and some checkboxes in item templates,if chkHeader is checked then all the chkitem are checked.code behind is used for this, these check boxes and one btndelete button is used for deletion,i want two javascript alert
for this delete button,delete button is outside of the grid , if any check box is selected then i want to dispaly th e java scrip alert "please choose an item" otherwise i f any one checkbox is checked and click the delete button then i want to display "are u want to delete this item" ,I cannot get the proper clientId for checkboxes,please help me(asp.net, c#,ajax,javascript)
|
|
|
|
|
You need to wire up the javascript call on the server side. You will only really be able to get the client ID on the server, where all that information is readily available. Something like the following:
void Page_Load(...)
{
chkMyCheckBox.Attributes.Add("onclick", "jsVerify('" + chkMyCheckBox.ClientID + "')");
}
|
|
|
|
|
hii,i have a slideShowExtender control in my project i want to get the images in the slideShowExtender as soon as i click the folder(which is in my local) plzz help me out
|
|
|
|
|
could somebody explain to me why on earth you would use a listview control (or almost any other asp:xxx control) on a web page?? i looked at using it just now and am frankly astounded at how much garbage there is just to draw a table on a page??? what on earth does it do that i'm not seeing??
genuinely could somebody please explain?
thnx
"mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"
|
|
|
|
|
Basically you may use ASP controls to render content dynamically.
In a few simple words, suppose you want to render a table with data from a DB. You cannot use a static HTML table with X rows, because you don't know how many rows you have in DB to display.
Simple options here are: to use <asp:table xmlns:asp="#unknown"> control, which can be dynamically rendered, you may add rows, columns, etc..using code behind(C#, VB), or, second option, to render HTML tags dynamically, but in this case you don't have managed support (let's say for each row from DB you'll add a < tr > tag).
Calin
|
|
|
|
|
ok i get that ... let me point out that i have been writing (and teaching) db driven websites for 6+yrs in python and php so i know exactly how to render dynamic content to html or xhtml
my question was meant to be more like ... what does the asp:listview give me (apart from a whole bunch of overhead) that rendering clean html directly doesn't?
thnx
"mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"
|
|
|
|
|
ok, then.
It gives you a lot of features like: dynamic rendering, binding, custom templates, insert/edit/update modes, integrated pagination, integrated sorting...
Calin
|
|
|
|
|
but with a huge overhead and complexity that depends on a 3rd party (in this case MS) getting it all working correctly and rendering properly
when it's very easy to do all those things without all the extra layers and overhead
that was why i was wondering what asp:xxx controls bring to the party and who they are aimed at?
"mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"
|
|
|
|
|
I think you might get on better with the ASP.NET MVC framework - It's a lot cleaner.
|
|
|
|
|
ahhhhh cool ... i'll take a look at that
thnx
[edit]
wow that looks cool ... url rewriting is built in
[/edit]
"mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"
modified on Saturday, February 28, 2009 7:20 AM
|
|
|
|
|
Oops I accidentally clicked on "bad question". sorry!
//I couldn't revoke. but made it a good question.
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
WinForms controls are designed for people who don't know, and don't want to know, anything about HTML. The same people who managed to write Windows apps for years without ever knowing anything about Win32. They are, IMHO, worse than useless if you actually need or want some control over what's actually sent to the client.
As Colin suggests, you'll probably be much happier with the MVC stuff.
|
|
|
|
|
coming from you that answers all i need to know
thnx
"mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"
|
|
|
|
|
HI
I Have scenario in which there are two websites configures in IIS 6 i have redirected the Website A to Website B in IIS, how can i track that user has enter the URL of Website A and redirected to Website B ?, kindly reply ASAP, thanks in Advance.
|
|
|
|
|
Try this: Request.ServerVariables("HTTP_Referer")
|
|
|
|
|
Thanks for your answer but it return null to me.
|
|
|
|
|
Because he didn't spell it right. HTTP_Referrer', I believe.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Christian Graus wrote: Because he didn't spell it right.
Shocking! Who could have ever guessed that getting specifications from internet forums was not as reliable as reading the documentation? Really, I mean who?
What can I say, IT'S FRIDAY!
|
|
|
|
|