Click here to Skip to main content
16,005,290 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

In this code file write a method having this signature.
VB
Public Function SaveSMTPSettings(ByVal SMTP_Host As String, ByVal SMTP_Port As String, ByVal From_Email As String,
 
ByVal Email_Password As String, ByVal Default_From As String)


And another method to call this method by pasing value of -

txtSMTP_Host , txtSMTP_Port , txtFrom_Email , txtEmail_Password , txtDefault_From in respective positions.
Posted
Updated 29-Nov-11 1:09am
v2
Comments
RaisKazi 29-Nov-11 7:10am    
Edited: 1) Formatting 2) Added "pre" tag.

1 solution

First of all whatever code you provided above is not a method it's a Function.There is so much difference between method and function.Function always returns a value.
You can call above function using following code :
VB
SaveSMTPSettings(txtSMTP_Host.Text , txtSMTP_Port.Text , txtFrom_Email.Text , txtEmail_Password.Text , txtDefault_From.Text)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900