query string in a email

Results 1 to 2 of 2

Thread: query string in a email

  1. #1
    Join Date
    Dec 1969

    Default query string in a email

    Hi,<BR><BR>I&#039;m including a query string in the body of a email so the receipient can review the form that has just been submitted. Unfortunately it&#039;s not passing the id and I&#039;m getting an error saying the resource could not be found. Here&#039;s part of my code can someone tell me what I&#039;m forgetting.<BR><BR>Imports alpaEmail<BR><BR>Namespace ASPNetPortal<BR> Public MustInherit Class ATAGrievance<BR> Inherits ASPNetPortal.PortalModuleControl<BR><BR><BR> System.Web.UI.WebControls.TextBox<BR> Protected WithEvents radYes As System.Web.UI.WebControls.RadioButton<BR> Protected WithEvents radNo As System.Web.UI.WebControls.RadioButton<BR> Protected WithEvents ddlequipment As System.Web.UI.WebControls.DropDownList<BR> Protected WithEvents txtviolation_date As System.Web.UI.WebControls.TextBox<BR> Protected WithEvents txtcontract_section As System.Web.UI.WebControls.TextBox<BR> Protected WithEvents txtdate_regionalchiefpilot_notified As System.Web.UI.WebControls.TextBox<BR> Protected WithEvents txtbriefdescription As System.Web.UI.WebControls.TextBox<BR> Protected WithEvents btnSubmit As System.Web.UI.WebControls.Button<BR> Protected WithEvents pnl1 As System.Web.UI.WebControls.Panel<BR> Protected WithEvents cbOpen As System.Web.UI.WebControls.CheckBox<BR> Protected WithEvents cbClosed As System.Web.UI.WebControls.CheckBox<BR> Protected WithEvents pnl2 As System.Web.UI.WebControls.Panel<BR> Protected WithEvents btnClear As System.Web.UI.WebControls.Button<BR> Protected WithEvents radstep1 As System.Web.UI.WebControls.RadioButton<BR> Protected WithEvents radstep2 As System.Web.UI.WebControls.RadioButton<BR> Protected WithEvents radstep3 As System.Web.UI.WebControls.RadioButton<BR> Protected WithEvents ddlgrievancestatus As System.Web.UI.WebControls.DropDownList<BR> Protected WithEvents txtgrievancecomments As System.Web.UI.WebControls.TextBox<BR> Protected WithEvents btnSubmit2 As System.Web.UI.WebControls.Button<BR> Protected WithEvents btnClear2 As System.Web.UI.WebControls.Button<BR> Protected WithEvents pnl3 As System.Web.UI.WebControls.Panel<BR> Protected WithEvents lblDate As System.Web.UI.WebControls.Label<BR> Protected WithEvents radSatisfied As System.Web.UI.WebControls.RadioButton<BR> Protected WithEvents radUnsatisfied As System.Web.UI.WebControls.RadioButton<BR> Protected WithEvents txtName As System.Web.UI.WebControls.TextBox<BR> Protected WithEvents txtEmail As System.Web.UI.WebControls.TextBox<BR> Protected strName As String<BR> Protected WithEvents txtrefnumber As System.Web.UI.WebControls.TextBox<BR> Protected WithEvents txtMEC As System.Web.UI.WebControls.TextBox<BR> Protected WithEvents txtAlpaNumber As System.Web.UI.WebControls.TextBox<BR> Protected WithEvents txtAirlineEmployeeNumber As System.Web.UI.WebControls.TextBox<BR> Private GrievanceItemID As Integer = 0<BR> <BR><BR>Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<BR><BR> Dim users As New UsersDB()<BR> Dim SingleUserDr As SqlDataReader = users.GetSingleUser(Context.User.Identity.Name)<BR > <BR><BR> SingleUserDr.Read()<BR> strName = Trim(SingleUserDr("FirstName")) & " " & Trim(SingleUserDr("LastName"))<BR> txtName.Text = strName<BR> lblDate.Text = Format(Now, "dddd, MMM d yyyy")<BR> txtEmail.Text = SingleUserDr("Email")<BR> txtAlpaNumber.Text = SingleUserDr("Id_No")<BR> If txtEmail.Text = "" Then<BR> txtEmail.Text = StrEmail<BR> End If<BR> SingleUserDr.Close()<BR><BR> <BR> End Sub<BR><BR> Private Sub btnSubmit_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnSubmit.Click<BR><BR> <BR><BR> Dim ae As New alpaEmail()<BR> Dim mssg As New Mail.MailMessage()<BR><BR> mssg.From = txtEmail.Text<BR> mssg.To = "fernandezf@alpa.org"<BR> mssg.Subject = "Grievance Submitted"<BR> mssg.Body = txtName.Text & " " & "has submitted a grievance for your review " & vbCrLf & "http://netdev.alpa.org/oss/DesktopModules/ATA/DesktopModules/atagrievance.aspx?GrievanceItemID"

  2. #2
    Join Date
    Dec 1969

    Default You're not concatenating the id

    Your link needs to be more like this "...GrievanceItemID=" + intID<BR><BR>You see, you&#039;re not actually posting an item id.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts