.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Public Function / Sub with multiple options

Posted By:      Posted Date: October 20, 2010    Points: 0   Category :ASP.Net

You know how the built in functions in VB.NET gives you the option to pass 1 parameter, 2, 3, or 4 all within 1 function, how do they do that? and when the intellesense comes out, there is a "1 of 4" on the top left of the intellesense and you can click to change and see what the other 4 options are.

View Complete Post

More Related Resource Links

Public Shared function doubt????

I am using VB.net/ASP.NET and SQL Server 2000 for a web application.

For populating the dropdowns, I wrote a Public Shared function LoadDDL(), in which I pass the dataset and dropdown name to set.

I have my doubts that this function will produce unexpected results for concurrent users. And will mix the results among sessions because it is a Shared function.

I am confused here. Is it the right way to go?

Please advice. Thanks in advance.


using single function to open multiple colorbox


Hi I have li like this

<li class="game">
                                    <div class="game-thumb">
                                        <a href="include/games/words.swf" class="gamelink">
                                            <img src="include/games/words.jpg" /></a></div>
                                    <div class="thumb-desc">
                                <li class="game">
                                    <div class="game-thumb">
                                        <a href="include/games/cat.swf" class="game2">
                                            <img src="include/games/dots.jpg" /></a></div>
                                    <div class="thumb-desc">
                                        Trap the CAT</div>
                                <li class="game">
                                    <div class="game-thumb">
                                        <a href="include/games/gravitymaster.swf" class=&qu

What are my options when I need to create a report with data from multiple sources?

Hello all,  What are my options when I want to create a report that will get records from multiple data sources based on data from a parameter? The user will enter the customer ID, I have to check that ID against 5 different data sources. Have you guys done anything similar? Should I leverage SSIS on this request, adding an extra layer of complexity? Should I do this all from SSRS? What are my options?

Multiple Windows Authentication options on login after Web App restore

Hi I have a question regarding SharePoint Foundation 2010 and backup / restore jobs... I'm doing nightly farm backups using PowerShell: Add-PsSnapin Microsoft.SharePoint.PowerShell Set-location $home Backup-SPFarm -Directory \\same-server\***** -BackupMethod Differential This morning I decided to try and restore a single web application, just to make sure it works. In Central Administration I selected the latest farm backup and then selected the node for the Web Application and choose restore (using option: Same configuration) because it's the same server. Restore process went fine, no failure messages, and I can see that it has restored the content I deleted for testing. BUT when I enter the site. I'm presented with a Login page (that you would see if you have also configured Forms Authentication for the same zone, which I have not) and the drop down box show two options: "Windows Authentication" and "Windows Authentication". Both let me use windows credentials to login so basically the login page is pointless and it wasn't there before. I should note: The Web Application was and is configured to use Claims Based Authentication and for Windows Authentication: Kerberos. Nothing for forms. Default sign in page. And I was never presented with this redundant login page before the restore. Anyone knows why this could be happening and how to solve it?? Than

Access Public Function in MasterPage

Hi,I need help in accessing the function in my masterpage.I have a.master and b.aspx with the content page.Now in the page load of my content page, I want to execute the an sql query which is in a function in my master page.How can I access the function in my master page??code in my master page:public function info () as string'SQL Queryend function

Use a WPF control in a Public Shared function



I am trying to write a program that uses a button on one window to alter a control in another window.  I have a Public Shared Sub declaration in the window I wish to alter, but I cannot put in the code to make the changes to the control (error is "Cannot refer to an instance member of a class from within a shared method or shared member initializer without an explicit instance of the class").  How can I get around this so I can change a control's properties from within a Public Shared function?


Options to host multiple workflows with WCF access

I have multiple workflows which have multiple Receive Activities.  I want to know which options I have to host them, where the workflows are accessed through the Receive Activities (WCF) only.  I know IIS is one option but what else can I use?  I currently use the WorkflowServiceHost but that of course can only host one workflow at a time.  I prefer to use Windows Service but do not know how to set it up for this.

Server Control Property With Multiple Options


I have a custom server control built. It works great. I want to expose a property so that in designer the developer can put a check which options they want enabled for that property. For example, it is a grid that has Edit, Update, Delete, Undelete displayed on each row.

I want to have a property called AvailableRowCommands (or something like that) so the developer clicks down, puts a check next to each one they want and they're done. So they coudl check just edit and update and not delete.

Would I use sub properties for this?

Thanks for your help!

Public Function Testing (ByVal FirstString as String, ByVal FirstInteger as Integer), how to pass a


I have the following function, sometimes I want to pass a DBNULL.Value to the function so I update the database with a null value, but it won't let me as the DBNULL.Value is not a string or an integer, how can I get this to work?

Public Function Testing (ByVal FirstString as String, ByVal FirstInteger as Integer), how to pass a DBNULL.Value?

' update database

Return value

End Function

Passing multiple arguments from a listview to a JavaScript function


Hello, I have been stuck on how to pass multiple to a JavaScript function in a item template of a list view. Below is my code. Does anyone know the process? Thank you.


                            <td style="width: 114px; height: 139px;">

                                <div style="width: 105px; height: auto">

                                    <img alt="" id="Image7" runat="server" src='<%# DataBinder.Eval(Container.DataItem,"images")%>'

                                        width="100" height="125" border="0" onmouseover='"javascript:show(<%# DataBinder.Eval(Container.DataItem,"images")%>)","(<%# DataBinder.Eval(Container.DataItem,"filename")%>)","(<%# DataBinder.Eval(Container.DataItem,"caption")%>)",1,234'

How to call a Public function of a window from another Window in WPF


How to call a Public function of a Mainwindow from another Window in wpf using VB.Net?

I checked this thread and tried to implement similar way as follows

1. Created an instance for the main window and declared a public function

Public Interface IMainWindow

 Function Show_Tickets(ByVal p_Para As String) As Boolean

End Interface

2. In the Mainwindow

at Initialization part

Class MainWindow

 Implements IMainWindow

3. Implemented the Function

Public Function Show_Tickets(ByVal p_status As String) As Boolean

Adding multiple packages to the SSIS project Options

I've got appr. 100 packages on a SQL server 2005 server, I need to
edit them and import to the new SQL Server 2008 server.
I used dtutil to import them to a directory. Is there any way I can
add all files from this directory to a SSIS project without clicking
'Add project' 100 times.

DirectorySearcher Filter Options - Multiple Groups in one Filter


Hi I'm looping through groups and displaying the user belonging to each group and I've just started working with the filter to exclude all groups except the one I specify in the filter like so:

Dim mySearcher As DirectorySearcher = New DirectorySearcher(eSecurity)
mySearcher.Filter = "(&(objectClass=user)(objectCategory=person)(memberof=CN=myGroupNameHere,OU=myOU,DC=myDC,DC=myDC))"

Is there a way I can extend the filter to select a number of groups like so:

mySearcher.Filter = "(&(objectClass=user)(objectCategory=person)(memberof=CN=myGroupNameHere,OU=myOU,DC=myDC,DC=myDC)(memberof=CN=myGroup2Here,OU=myOU,DC=myDC,DC=myDC))"

I've tried a few different arrangements of code, but haven't been successful yet. Does anyone know how or if I can use the filter in this way?

Hope you guys can help me out. I've found the information here indispensable!!

Multiple database support with Entity Framework

One of the features introduced in Entity Framework is being database independent. Which mean each database provider can support Entity Framework by implementing its provider.

This feature allows you build applications independent from the underplaying database provider. In this post I'm going to show how to build an application that support multiple databases using same conceptual model made by Entity Framework.

Binding the multiple drop down boxes in GridView using JQuery in ASP.NET

Here is the code for binding the multiple drop down boxes in GridView using JQuery in ASP.NET

Upload Multiple File using JQuery in asp.net

In this article I have explained how to upload multiple files using file upload control. I have used jQuery plugin for uploading multiple files.

I have also explained how to check for file type, file maximum size limit using jQuery & also using server side validation code.

Adding Multiple Columns and Rows in GridView without using a Database

This article describes on how to add multiple columns and rows in GridView without using a database. Basically the GridView will be populated with data based on the values entered in each TextBoxes on Button Click and retain the GridView data on post back.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend