?
Solved

Optional parameters on ASP.net using VB function

Posted on 2009-04-26
7
Medium Priority
?
504 Views
Last Modified: 2013-11-07
HI

Would be possible to use "optional" parameters on asp.net/vb functions instead of overloading it ?

Thanks in advance.
0
Comment
Question by:dimensionav
  • 3
  • 2
6 Comments
 
LVL 29

Expert Comment

by:Kumaraswamy R
ID: 24238993
Hi.
 In VB.net Optional parameter not possible, So we can use Function Over loading. It sloves Ur Problem
0
 
LVL 39

Accepted Solution

by:
Pratima Pharande earned 2000 total points
ID: 24239014
it is possible to have option parameters
try this

     adduser("firstname")
        adduser("firstname", "Lastname")
Function
Public Function adduser(ByVal firstname As String, Optional ByVal Lastname As String = "") As String
        Return "test"
    End Function
 
Function calls

Open in new window

0
 

Author Comment

by:dimensionav
ID: 24239038
pratima_mcs:

You´re right, I have found this: http://www.knowdotnet.com/articles/optionalparams.html, and they recommend not to use it, but the fact is that optional parameters are available on asp/vb .net.

Thanks
0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
LVL 39

Expert Comment

by:Pratima Pharande
ID: 24239050
yes we can't say that "VB.net Optional parameter not possible"
0
 

Author Comment

by:dimensionav
ID: 24239057
I have asked for assistance in order to reassign the points to your answer.

Thanks.
0
 

Author Closing Comment

by:dimensionav
ID: 31574796
Thanks
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Screencast - Getting to Know the Pipeline
Suggested Courses

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question