|
We can't tell you the answer to that. You can't send mail without a mail server, that's your problem. You should be more specific, if your actual question is more specific.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
benams wrote: can someone bring an example of sending email using asp.net c#?
Yes Sure,
sending mail using C# and asp.net[^]
Hope this will help you
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Hello,
i've written code for sending mail in asp.net 2.0. I'm not getting any errror message,rather i'm receiving msg of "Message sent successfully". BUT STILL I'M NOT RECEIVING ANY EMAIL IN MY MAILBOX.I've written following code.
in .aspx page,
Imports System.Net.Mail
Protected Sub btn_Send_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_Send.Click
Dim message As MailMessage
message = New MailMessage(txt_From.Text, txt_To.Text, txt_Subject.Text, txt_Message.Text)
Dim client As SmtpClient = New SmtpClient("192.168.1.2")
client.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis
client.Send(message)
lbl_msg.ForeColor = Drawing.Color.Red
lbl_msg.Text = "Message sent successfully !"
End Sub
and in the web.config, i ve written the following tab.
<system.net>
<mailSettings>
<smtp from="mail.eqlsoft.com">
<network host="mail.eqlsoft.com" port="25" defaultCredentials="true"/>
</smtp>
</mailSettings>
</system.net>
in addition to this i've configured my SMTP Server,as per guidelines in one of the forums on codeproject.
BUT i'm not very sure about the Smart Host name.
can you please help me... its urgent !!!
|
|
|
|
|
madhura apte wrote: can you please help me... its urgent !!!
No, it's not. We actually don't care if you can send mail or not.
madhura apte wrote: Dim client As SmtpClient = New SmtpClient("192.168.1.2")
client.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis
This looks messy. Why not just read the server settings and send it in your code ? I mean, your message says 'sent successfully', but that means nothing, you just wrote that code. Could I use this mail server if I wanted ? No logon is required ? That seems odd to me. The whole thing looks convoluted to me. Just write a method that reads the mail settings from your web config and sends an email, then use that helper method throughout your code.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I have to update a table based on some values in different dropdowns.
One of these values is part of composite primary key also.
In row_updating event, I have written the code to update the tabel.
Update table xyz set order=order_dropdown.selectedvalue, some more values... where emp_id=3,order=order_dropdown.selectedvalue.
Now in "where" and "set" clauses, order_dropdown.selectedvalue has used.
"where" should pick up the old value ideally but it will pick up latest value.
Due to this, updation does not take place.
So how to capture the original value in row_editing event and pass that original value in row_updating event?
|
|
|
|
|
You want to get a value other than the value that has been selected ? How do you hope to do that ? You're going to have to store it somewhere.
If you mean it's reseting and is NOT the selected value, it's because you're binding the datasource on postback in your page load.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Just providing more details about my requirement:
I have a gridview that has a dropdown column. All works fine until I go to edit mode. Here if change any value in dropdown, I can select that. But what about the original value? how to fetch that?
|
|
|
|
|
Hi guys,
Some of my Questions regarding ascx page in asp.net web application:-
- How we can convert read only ascx/aspx page to write mode?
And if we can convert it in write mode than again how we can reconvert in read only mode?
- In asp.net web application, Is it necessary to make ascx page always read only?
And why we can make the ascx page read only in asp.net web application?
Kunal Naik
|
|
|
|
|
kunal naik wrote: - How we can convert read only ascx/aspx page to write mode?
I have no idea what you're talking about.
kunal naik wrote: ascx page
There's no such thing as an ascx page, I assume you mean an ascx control ?
kunal naik wrote: In asp.net web application, Is it necessary to make ascx page always read only?
If the files are read only or not shouldn't matter, but I've never heard of a valid design for a website that attempts to change the contents of the aspx or ascx files on the server.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
First Understand The User Control Then You can ask .
Its Easy It is Simple User Control
Here is a link
http://msdn.microsoft.com/en-us/library/fb3w5b53.aspx[^]
http://www.codeproject.com/KB/webforms/MenuControlSelectedItem1.aspx
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Sorry Same Post..!
http://www.codeproject.com/KB/webforms/MenuControlSelectedItem1.aspx
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
I want to use dropdown list in Web Parts
but in web parts dropdown can be use using Enum only.
I want to bind Dropdown with datatable (value comes from database at runtime)
and one more thing I have 2 dropdown lists in a web part
second dropdown bind on the basis of selected value of First one.
Please tell me how to bind dropdownlist in web parts
I need to maintain personalization
Thanks
|
|
|
|
|
What every you want to with dropdownlist do it in a user control . Place the user control inside the web parts.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
i need to maintain personalization also
means selected values in all dropdown should be maintain as per user log in.
is this possible using user control ?
|
|
|
|
|
Yes. Personalization is nothing do with User control, Its based on your web parts. First of all you need to configure your database.
Read this article,
Webparts Personalization[^]
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
I already configured database.
I can get personalization if there is any texbox. just i need to personalize the property.
but i want to do the same with dropdown.
in web parts dropdown can be show using Enum.
that propery must be of enum type if you want to show dropdwon then it automatically converts it into a dropdown.
how can i achieve this if i have a datatable or data comes from database at runtime ?
|
|
|
|
|
I want an editable Dropdown for the asp.net application. This ASP.net 2.0.
Please can anybody provide the code?
|
|
|
|
|
|
|
I have a background image and I want a part of it to be transparent (instead of white). Is that any way to do it?
|
|
|
|
|
Use photoshop to do that.
|
|
|
|
|
Create Watermark image using some tool, then set it as Table background !
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
I m developing a online exam portal . I have used a javascript for timer. when time finishes it should fire a button_submit.
but when user hits a refresh button time is starting from first.
Is there any way to copy timeAlloted value when page is unloaded . or to use any session variable to store the value before unload and retrive after reloading the page.
** i have used question paper in iframe and timer display in parent page. when time finishes it should fire a submit_click which is hidden in question page(inside iframe).
|
|
|
|
|
Be aware that whatever you do, unless you store the time you started on the server, the user will be able to cheat it. And if you store it on the server, you can use that on postback to refresh the time remaining.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
After logging out of my web application I do not want the user to be able to get back into it simply by clicking the browser Back button.
After doing some reading I don't think javascript will allow you to clear browser cache. Do I have to prevent all my asp pages from being cached? On commercial sites it seems that caching is on because the Back button does work. However, after logging out and hitting the Back button an expired page is displayed. How do they do this?
|
|
|
|