Passing a Variable from one web site to another for ASP

G

Guest

I am new to the ASP and VB thing so be kind. Question I have is that
I have created an ASPX web site to use as an E-Mail page. But I want
to use this for a lot of users. Can I create the link on the WEB site
to mail to passing a variable from the WEB site to the ASPX web site
to E-Mail to? Hope I explained this correctly.

This is a response from another group.

There was no way for you to know it, but this is a classic asp newsgroup.
While you may be lucky enough to find a dotnet-knowledgeable person here who
can answer your question, you can eliminate the luck factor by posting your
question to a group where those dotnet-knowledgeable people hang out. I
suggest microsoft.public.dotnet.framework.aspnet.

I don't quite understand your question. But if you're asking how to pass a
variable from a non-aspx page to an aspx page, you can use a querystring
variable.

Yes and how to do that. From HTML to ASPX. More info and HELLLLPPPP...
 
C

Chris

James said:
I am new to the ASP and VB thing so be kind. Question I have is that
I have created an ASPX web site to use as an E-Mail page. But I want
to use this for a lot of users. Can I create the link on the WEB site
to mail to passing a variable from the WEB site to the ASPX web site
to E-Mail to? Hope I explained this correctly.

This is a response from another group.

There was no way for you to know it, but this is a classic asp newsgroup.
While you may be lucky enough to find a dotnet-knowledgeable person here who
can answer your question, you can eliminate the luck factor by posting your
question to a group where those dotnet-knowledgeable people hang out. I
suggest microsoft.public.dotnet.framework.aspnet.

I don't quite understand your question. But if you're asking how to pass a
variable from a non-aspx page to an aspx page, you can use a querystring
variable.

Yes and how to do that. From HTML to ASPX. More info and HELLLLPPPP...

Passing in the Query string means passing the variable in the URL. Do a
search on ASPX and query string, you'll get info.

Example:
http://www.somewebpage.com?Variable=Value

This example means that the recieving web site is expecting a value for
a parameter called Variable.

Hope this helps.
Chris
 
G

Guest

OK so I have that and get it. Now here is my code, I want to insert the
[email protected] to the string "(e-mail address removed)" to
accept the variable from elier. How and where? Code would be really great.
Thanks in advance. I have learned quite a bit in the experience.

Partial Class _Default
Inherits System.Web.UI.Page

Protected Sub Wizard1_FinishButtonClick(ByVal sender As Object, ByVal e
As System.Web.UI.WebControls.WizardNavigationEventArgs) Handles
Wizard1.FinishButtonClick
SendMail(TXTEMail.Text, TXTSubject.Text, TXTComments.Text)
End Sub

Private Sub SendMail(ByVal from As String, ByVal subject As String,
ByVal body As String)
Dim mailServerName As String = "SERVER.SERVER.NET"
Dim message As MailMessage = New MailMessage(from,
"(e-mail address removed)", subject, body)
Dim mailClient As SmtpClient = New SmtpClient
mailClient.Host = mailServerName
mailClient.Send(message)
message.Dispose()
End Sub

End Class

James Robertson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top