Private Sub MailIt(ByVal toUser As String, ByVal fromUser As String, ByVal subj As String, ByVal sBody As String)
Dim mm As New MailMessage(fromUser, toUser)
mm.Subject = subj
mm.Body = sBody
mm.IsBodyHtml = True
' Create the SmtpClient object
Dim smtp As New SmtpClient
' Send the MailMessage (will use the Web.config settings)
Catch ex As Exception
I'm making the big assumption that you are developing your website with ASP.NET.
You would place an ASP.NET button (different from an HTML button) on the page and for the OnClick event in the code behind you would have something like this:
Protected Sub btnEmail_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnEmail.Click
Call MailIt("firstname.lastname@example.org", "fromMe@buzz.com", "This is a test subject", "This is the body of the email")
If you are not using ASP.NET, then I may have mislead you.
I made this flash movie of an elephant a while ago. It had a cool script that made the elephant's eyes follow the cursor around the screen. But the latest flash has screwed it up. I get some security message. Anyone know what that's about?
I want some information related to web development using ASP.net.
Actually I have a project in which I use electronic Devices connected to PC and Collect Data From These Devices by using DLL files.
But this project is a Desktop Application which runs in background and keeps on collecting data from Device.
Now i want to convert this to Web Application and I want to know whether I can use the DLL file as i use in Desktop Application, If Yes then whether I need to keep the file at Server Level or do i need it on the client PC.
Another query is How Can I Detect and Use USB Ports, COM Ports and Devices Connected to these ports on Client PC using my Web Application.
In generally web serice is independent platform,where ever created web serice we can access any playform.right.My client web service developed in java platform.i want to add that web serice in asp.net.
when i add that web serive via add web reference in vss 2005 its showing following errror.
The document at the url http://httpno/test/service1 was not recognized as a known document type.
The error message from each known type may help you fix the problem:
- Report from 'WSDL Document' is 'There is an error in XML document (1, 2).'.
- <html xmlns=''> was not expected.
- Report from 'DISCO Document' is 'Discovery document at the URL http://httpno/test/service1 could not be found.'.
- The document format is not recognized (the content type is '').
- Report from 'XML Schema' is 'Expected Schema root.
Make sure that the root element is <schema> and the namespace is 'http://www.w3.org/2001/XMLSchema' for an XSD schema
or 'urn:schemas-microsoft-com:xml-data' for an XDR schema. An error occurred at , (1, 2).'.
I have a pllication developed for ie(fully compatible with ie6) i want it to run in ie8 as well.so i added to emulate IE7 in the meta of my master page as follows
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
Every thing seems ok
i have many drop downs in the page.i am using a css to set the dropdown properties font-size:11px;
but when i scroll down the page and scroll back up again the text displayed in the drop down is streched vertically.When i point my mouse near the drop down control it comes back to the original size.
I have tried all the css properties but no result;