vb.net

Where and When to use LINQ to Objects?

In which situations I should use LINQ to Objects? Obviously I can do everything without LINQ. So in which operations LINQ actually helps me to code shorter and/or more readable? This question triggered by this ...

Library or Code Snippet for AutoComplete in Text Control based on the previous user entered values

I'm looking for a library for Autocomplete support in text controls which remembers all previous entries of the user and provide auto-complete support for it. For example for "recent files" I use http://www.genghisgroup.com/ and it works great. Do you know something like that for this purpose? UPDATE : This is a .NET Winforms applicati...

Programmatically change selection on DatagridView (.NET)

Hi, I'm learning VB.NET. I've a problem with DataGridView component when trying to set the value of the CurrentCell. What i'm trying to do is : I've a DataGridView With values. I want to make a button in my forms and when clicking on it I want to change the selection from the current row to the next. To explain more, by clicking m...

When the user presses "Enter" in a ToolStripTextBox (VB.NET)

I have a ToolStripTextBox (the name of it is SearchBox) and I would like it when after the user types something and presses enter it takes them to a URL. I've got the URL part sorted out, but I need to know what goes after Handles SearchBox.{what?} I don't see any event in the intellisense popup for something when the user presses "en...

Visual Studio 2008 Build Dependency Chain

I am having an issue with Visual Studio 2008 SP1. Basically, I have a .NET 3.5 solution with a client, shared and server component. While coding, all components run on the same box, but in production the server component is a standalone (remoting) service running on a separate server. I would expect that a change to the client component...

Populating drop down list from another thread in ASP.NET

Hi, I have multiple drop down lists on a page. They all contain list of countries. So in the background I am getting countries from database and caching them. I would like to populate those drop down lists from another thread. I am also using AJAX controls so I wanted that it all happens at the same time. And also after a user selects a ...

Connecting a button and a text box in Visual Basic

I'm stuck on this exercise that asks me to create a text box and a button. Each time the button is pressed it is supposed to add 1 to the text box. Anyone know how to approach this? ...

Data Migration in sql 2005

In my Live sql database ,I have to change the date value from (date, month ,year) to date. Now there is 100 records with the date as date,month ,year(3 Fields).iF I change directly to date Field all the datas in the 3 field of those 100 records will automaticly change to a default date and original dates will disappear.What should i do ...

How can I export my ASP.NET page to Excel?

How can I export the data in my webapp to an Excel sheet from ASP.NET (VB.NET,SQL 2005)? ...

Is there a conditional ternary operator in VB.NET?

In Perl (and other languages) a conditional ternary operator can be expressed like this: my $foo = $bar = $buz ? $cat : $dog; Is there a similar operator in VB.NET? Thanks to Lucky and Kris, I now know that in VB.NET this operation is expressed like this: Dim foo as String = IF(bar = buz, cat, dog) ...

Get files being deleted in windows

I want to create an application that will save the files being deleted from a flash drive into a part of the flash drive that acts as recycle bin. I want to capture the deletion event of windows so that I can copy the files marked as deleted. Is there a library that would notify my application if the delete event is being executed? If...

Appbase being set to nothing at runtime

I have a difficult to reproduce error on about three user installs out of 20. This is a .net Windows application, 2005 in VB.Net running on XP. After opening up a window, we get an error: Could not load file or assembly 'Infragistics2.Win.UltraWinChart.v8.2, Version=8.2.20082.1000, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb' o...

Problems adding a VB dll to a C# project

I am compiling and importing this multicolumncombo box class. I am able to run the demo program that comes with it without a hitch. However when I compile it for release and include the /obj/Release/CodeSamples.dll as a reference in my C# project, the examples won't work any more. Specifically, selecting an item doesn't work. I can add a...

OOP - Objects For Entities With Master Lists and Object Composition

I'm trying to wrap my head about how to properly implement an OOP design for business objects that: Have a "master list" in a database (ex. classifications) Are a part of another object as a property (i.e. object composition) but with additional properties Here is where I'm stuck on the theory. Suppose that I have a Classification ob...

System.DirectoryServices pegs my processor when multi-threaded - can I lower the burden?

My application takes the currently logged-in user and uses an a DirectoryServices.DirectorySearcher to pull a few additional detail about them (some properties we have stored in a few custom AD fields, as well as their email address). This works great, though I've always though it was a little slow - my single-threaded code could only ma...

How can I encode an Array in VB.NET to JSON?

I need to pass back a JSON result for a routine I am working with. How can I encode an Array I created to JSON? I am writing this in VB.net ...

Browser history cleared after navigating to a pdf via href

Ok, hopefully I have worded this in a way that you can understand. I'll start off by saying my website has a landing page of http://www.mywebsite.com/PageOne.aspx On PageOne.aspx, I have a link to another page: http://www.mywebsite.com/PageTwo.aspx On PageTwo.aspx, I have an link to the following: <a href="http://www.mywebsite.com/M...

VB.NET Continuously Adding One to a Text Box

I am trying to create a program that has a button and a text box. Everytime the button is pushed I want it to add one to the text box. I keep getting this error: Overload resolution failed because no accessible 'Int' accepts this number of arguments Also I am a huge n00b. Here is where I am at so far, thanks in advance. Optio...

Where can I find some websites with VB.NET tutorials?

I am looking for a website similar to W3Schools that teaches the basics for VB.NET 2008. If none exist I would just like some good tutorials to get me started. I did some basic VB.NET a couple of years ago but I need to refresh myself, any ideas? ...

Safest way to check for integer.

This is probally more of an elegance question than functionality. I am looking for the absolutely safest way to check for an integer from a string and an object, Using most of the built in functions for this in .net seem to generate a first chance exception, displayed in the Immediate window, and over time they just build up. what are t...