Questions tagged [vb.net]

Visual Basic .NET (VB.NET) is an object-oriented computer programming language that can be viewed as an evolution of Microsoft's Visual Basic 6 (VB6) but implemented on the Microsoft .NET Framework.

Filter by
Sorted by
Tagged with
11
votes
1answer
2k views

Another way to implement weak event handlers in vb.net

Summary: Please let me know, what weaknesses do you see in the described workaround for event handlers preventing garbage collection of registered listener objects... I'm in the development of and ...
3
votes
4answers
20k views

Checking datasets for tables and rows [closed]

Is there a cleaner way of checking a dataset for tables/rows before attempting to read them? ...
2
votes
1answer
1k views

ASP.NET account login system implemented via Masterpage and Panels

I have been tasked with implementing a secure account login system for a website's content management system. I have built a solution around an access masterpage that handles all account access ...
3
votes
2answers
6k views

Switching back and forth between forms

Topic 1: Switching to another form from the project startup form I use the following code that calls an instance of my form for payment (frmPayment) from my ...
2
votes
3answers
2k views

Calling stored procedure with a sqlCommand

I have the following code as part of an sqlCommand which is calling a stored procedure: ...
3
votes
1answer
331 views

My program spikes from 100,000K mem to 1,000,000K mem in a matter of minutes in my program in VB.net [closed]

I've created a program that uses System.Graphics to render a simple (small) 2D scene to the screen. The problem is, for some reason, it starts to quickly ...
8
votes
1answer
367 views

Using Delegates and BeginInvoke with .NET 2.0 WebServices

I'm attempting to implement a simple long-polling/comet/reverse AJAX solution, and came across the concept of delegates, specifically with the BeginInvoke and ...
1
vote
1answer
171 views

Optionally running some code on a background thread

Is this a good method to optionally run some code on a background thread depending on a configuration setting? This will primarily be called from an ASP.NET front-end (although others are possible) ...
1
vote
1answer
823 views

Refactor IF into Chain of Responsibility Pattern

I've been trying to learn different patterns of programming, and the "Chain of Responsibility" sort of eludes me. I've been told that my specific code snippet would be a good candidate for chain of ...
1
vote
3answers
1k views

Case statement in multiple methods

My page contains: GridView1, GridView2, Button1, Button2, DropDownList1 I bind Gridviews to the table selected in dropdown like this: ...
5
votes
1answer
975 views

Processing a webpage source

I have developed a test app that works by getting webpages source and processing it. I have up to 100k URLs in queue and want to use a maximum of 25 threads. Please help me check if the code is good ...
2
votes
1answer
1k views

multiple threaded program vb.net

i have this code that is suppose to work with at starting the minimum number of threads, say 5. when it starts the first five threads, it automatically replaces any thread that is finished making ...
3
votes
1answer
259 views

C in CRUD for Silverlight

The C in CRUD Silverlight: Create new Silverlight business application "CRUD" Add ADO.NET Entity Data Model to CRUD.web Select the db, the tables, build the project Add Domain Service Class to CRUD....
12
votes
1answer
595 views

Utility functions for supporting memoization for functions

I've got a couple of utility functions to support memoization for functions with anywhere between 0 to 8 arguments: ...
6
votes
4answers
6k views

Function to test if the current time is within a time window

I have written the following code that tests if the current time is within a time window. It seems to work ok with my test cases, but I would be interested if anyone can see any possible problems or ...
2
votes
2answers
278 views

Iterate comparison - How can I write this better?

I would like to write the following piece of code cleaner and more efficient, any comments will be greatly appreciated: ...
3
votes
1answer
238 views

Refactor a subroutine that divides date range into quarters.

The subroutine below, GetDetailsQuarterly, accepts two dates. Then it writes out each quarter that falls within the date range. It also gives the first and last day of the quarter. I really don't like ...
4
votes
1answer
368 views

Display catalog product quantity

I have a simple quantity display function that runs for every product displayed in our catalog. The MaxQtyDisplay value is set in our web.config file. Part of me ...
4
votes
3answers
352 views

Is this a proper use of a services project and an ASP.NET MVC controller? [closed]

I'm a little unsure as to what code belongs in the services and what belongs in the controllers. Lets say I'm creating a website that requires a fine grained level of permissions (e.g. a user has ...
4
votes
1answer
512 views

WebMethod slower on execution than Windows application of the same code

I have developed an application that interacts with IBM ClearQuest. The problem is that when I run everything locally, such as, run the webservice local and then ASP page local, everything is at the ...
6
votes
2answers
6k views

Recursive database actions

I am been using a code pattern for recursive database actions in my applications. I create two class objects of a database table, singular one (e.g Agent) for holding single record with all fields ...