Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Emailing a randomly generated Password
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Emailing a randomly generated Password

 Post Reply Post Reply Page  <123>
Author
Diep-Vriezer View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 August 2003
Location: Netherlands
Status: Offline
Points: 831
Post Options Post Options   Thanks (0) Thanks(0)   Quote Diep-Vriezer Quote  Post ReplyReply Direct Link To This Post Posted: 19 November 2003 at 6:35am

Not really..

By the way, you can also use the objEmail for creating an e-mail message.

Dim objEmail As New MailMessage

With objEmail

  .To = "..@.."
  .Body = "..2@.."

End With

SmtpMail.Send(objEmail)

Gone..
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 19 November 2003 at 9:32am
Its an SQL statement error, If your selecting a number dont use 'quotes' if that still doesnt work post in your SQL statement or go to www.w3schools.com/sql
Back to Top
IrishNewbie View Drop Down
Newbie
Newbie


Joined: 06 November 2003
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote IrishNewbie Quote  Post ReplyReply Direct Link To This Post Posted: 19 November 2003 at 12:12pm

Ok Ive gotten rid of that error, my problem is not knowing how to use a variable which is received from the statement, outside of where i get it, if i want to use it in the html part of my page how do i do it.



Edited by IrishNewbie
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 19 November 2003 at 12:49pm
Just use a simple label!!! you really need to learn the basics.
Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post Posted: 19 November 2003 at 1:39pm
<script runat="server">
Sub Page_Load( obj as Object, e as EventArgs )
     Dim I_am_a_variable As String
     I_am_a_variable = "It's a Fuster Cluck"
     clue.Text = I_am_a_variable
End Sub
</script>
<html>
<body>
Survey says:<br />
<asp:label id="clue" runat="server"/>
</body>
</html>
Contribute to the working anarchy we fondly call the Internet
Back to Top
IrishNewbie View Drop Down
Newbie
Newbie


Joined: 06 November 2003
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote IrishNewbie Quote  Post ReplyReply Direct Link To This Post Posted: 19 November 2003 at 3:17pm
not what i meant, i want to use the EmailName returned by the statement and bring it down to where im sending the email, it wont let me just say "EmailTo" as it says that it isnt declared. do ye know what i mean?
Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post Posted: 19 November 2003 at 7:13pm

now i wrote this off the top of my head, but here's the code i would write if i was doing something like what you are trying to do

i wrote it in Notepad on my desktop and didn't check if it works, so if i have a typo somewhere or something..... tough, lol

Contribute to the working anarchy we fondly call the Internet
Back to Top
IrishNewbie View Drop Down
Newbie
Newbie


Joined: 06 November 2003
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote IrishNewbie Quote  Post ReplyReply Direct Link To This Post Posted: 20 November 2003 at 7:47am

Thanks MorningZ, ive tried it and i reckon theres a problem getting the txtUserID from the Login page, Should i put it as an Int on the Email page if its a Int on the Login page?? Ive tried this and no success, its telling me everytime that there was a problem sending the email,  this is the Redirect section of my login page,

If Login (txtUserID.Text) Then   
      FormsAuthentication.RedirectFromLoginPage ("txtUserID.Text", False)
 
  Else
      ' Invalid credentials supplied, display message
      lblMessage.Text = "Invalid login credentials"
  End If

 

Back to Top
 Post Reply Post Reply Page  <123>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.