Click here to Skip to main content
15,892,965 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: MCiWnd api problem. Pin
V.G25-Jan-09 2:33
V.G25-Jan-09 2:33 
GeneralRe: MCiWnd api problem. Pin
Dave Kreskowiak25-Jan-09 5:18
mveDave Kreskowiak25-Jan-09 5:18 
QuestionNeed intro to TcpListener & TcpClient Pin
VIP-CoMmAnDo24-Jan-09 15:52
VIP-CoMmAnDo24-Jan-09 15:52 
AnswerRe: Need intro to TcpListener & TcpClient Pin
Dave Kreskowiak25-Jan-09 5:08
mveDave Kreskowiak25-Jan-09 5:08 
QuestionUse Interface imported from COM dll Pin
o m n i24-Jan-09 12:52
o m n i24-Jan-09 12:52 
AnswerRe: Use Interface imported from COM dll Pin
Dave Kreskowiak25-Jan-09 5:07
mveDave Kreskowiak25-Jan-09 5:07 
QuestionRe: Use Interface imported from COM dll Pin
o m n i25-Jan-09 5:29
o m n i25-Jan-09 5:29 
QuestionHow to submit vb.net form Pin
Riyaz.R24-Jan-09 10:46
Riyaz.R24-Jan-09 10:46 
Hi All,

I create a file like mail.aspx and mail.aspx.vb to send email. I show this form through thickox like <a href="/mail.aspx" class="thickbox">, this same link i have called 3 places index page, under content folder index page and under inventory folder index page.

index.aspx
content/index.aspx
inventory/index.aspx

If i click the link on index.aspx, it's works find and i received mail also but this same functionality is not working on other two place.

Any body have idea why this is not working.

I want where can i provide the form action on mail.aspx page.

Kindly go through this code and tell me your suggestions.

<b>mail.aspx</b>
<code>
<%&@ Page Language="VB" Src="mail.aspx.vb" Inherits="formProcessor" %>;
<form id="form1" runat="server">
<table>
<tr>
<td style="color: #FFFFFF">
Enter Your Mail Address:
<asp:TextBox ID="txtTo" runat="server" Columns="30" Width="154px"></asp:TextBox>
</td>
</tr>
<tr>
<td align="center">
<asp:Button ID="SendEmail" runat="server" onclick="SendEmail_Click" Text="Send " Width="57px" />
&nbsp;
<input type="button" id="Cancel" value="Cancel" onclick="tb_remove()">
</td>
</tr>
</table>
</form>
</code>


<b>mail.aspx.vb</b>
<code>
Imports System
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Data.SqlClient
Imports System.Data
Imports System.Web.Mail
Imports Microsoft.VisualBasic
Imports System.Configuration

Public Class formProcessor : Inherits Page
Protected txtTo As TextBox

Sub SendEmail_Click(ByVal s As Object, ByVal e As EventArgs)
Dim strEmailTarget As String
Dim strEmailNoReply As String
Dim sText As String
Dim strSubject As String
strEmailTarget = txtTo.Text

strEmailNoReply = "support@thenetlab.com"
strSubject = "Coupon Email Address"
sText = strEmailTarget
Call NetEmail(strEmailNoReply, strEmailTarget, strSubject, sText)
Response.Redirect("http://dodge.friendlyautogroup.thenetlab.net/inventory/listused.aspx?s=u")
End Sub

Sub NetEmail(ByVal emailFrom As String, ByVal emailTo As String, ByVal emailSubject As String, ByVal emailBody As String)
Dim arrEmailTo() As String
arrEmailTo = Split(emailTo, ",")
Dim intMailLoop As Int32
For intMailLoop = 0 To UBound(arrEmailTo)
Dim objMail As New MailMessage()
objMail.From = emailFrom
objMail.To = arrEmailTo(intMailLoop)
objMail.Subject = emailSubject
objMail.Body = emailBody + vbCrLf ' + intMailLoop.toString()
SmtpMail.Send(objMail)
Next
End Sub
End Class
</code>

Thanks in advance Smile | :)
AnswerRe: How to submit vb.net form Pin
Dave Kreskowiak24-Jan-09 11:03
mveDave Kreskowiak24-Jan-09 11:03 
AnswerRe: How to submit vb.net form Pin
Ashutosh Phoujdar26-Jan-09 19:49
Ashutosh Phoujdar26-Jan-09 19:49 
QuestionNeed Help! Pin
ShayanTanwir24-Jan-09 7:00
ShayanTanwir24-Jan-09 7:00 
AnswerRe: Need Help! Pin
Dave Kreskowiak24-Jan-09 11:06
mveDave Kreskowiak24-Jan-09 11:06 
QuestionError handler only works once in loop Pin
timb11124-Jan-09 5:50
timb11124-Jan-09 5:50 
AnswerRe: Error handler only works once in loop Pin
Dave Kreskowiak24-Jan-09 10:46
mveDave Kreskowiak24-Jan-09 10:46 
QuestionInventory project to be converted to asp.net Pin
Subin Alex24-Jan-09 1:18
Subin Alex24-Jan-09 1:18 
AnswerRe: Inventory project to be converted to asp.net Pin
Dave Kreskowiak24-Jan-09 4:49
mveDave Kreskowiak24-Jan-09 4:49 
Questionbarcode generate Pin
ved Barharwa24-Jan-09 0:16
ved Barharwa24-Jan-09 0:16 
AnswerRe: barcode generate Pin
Wendelius24-Jan-09 3:06
mentorWendelius24-Jan-09 3:06 
AnswerRe: barcode generate Pin
programmervb.netc++24-Jan-09 11:21
programmervb.netc++24-Jan-09 11:21 
Questionbarcode Pin
ved Barharwa24-Jan-09 0:14
ved Barharwa24-Jan-09 0:14 
AnswerRe: barcode Pin
Rupesh Kumar Swami24-Jan-09 0:27
Rupesh Kumar Swami24-Jan-09 0:27 
AnswerRe: barcode Pin
Mr Oizo25-Jan-09 22:47
Mr Oizo25-Jan-09 22:47 
QuestionNumericUpDown object question. Pin
dtskull23-Jan-09 20:13
dtskull23-Jan-09 20:13 
AnswerRe: NumericUpDown object question. Pin
Rupesh Kumar Swami24-Jan-09 0:21
Rupesh Kumar Swami24-Jan-09 0:21 
AnswerRe: NumericUpDown object question. Pin
Dave Kreskowiak24-Jan-09 4:45
mveDave Kreskowiak24-Jan-09 4:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.