vb.net

how to set input charset to unicode in VB.net or VC++.net

Hi there fellow programmers.. i am using Web Browser control in VB.net 2005, the application i wrote shows a webpage on my computer which has 2 text areas, one for input, and the other for output. my problem is, i need the charset of the whole program to be unicode, coz the charset of the webpage is utf8. and right now, when i process ...

Global keyword in Visual Basic 2005?

I have to inherit some legacy code in company, which is written in Visual Basic.NET 7.0 (Visual Studio.NET 2002). I don't have much experiences in VB.NET, and this line of code gets me in trouble: Public Class Global : Inherits System.Web.HttpApplication Visual Studio gave this error: Error 31 Keyword is not valid as an identifier....

Whats the Best Practice for a Search SQL Query?

I have a SQL 2008 Express database, which have following tables: CREATE TABLE Videos (VideoID bigint not null, Title varchar(100) NULL, Description varchar(MAX) NULL, isActive bit NULL ) CREATE TABLE Tags (TagID bigint not null, Tag varchar(100) NULL ) CREATE TABLE VideoTags (VideoID bigint not null, ...

Last Five Pages Visited Cookie

Hi, So, I have a series of product pages and all I'd like to do is store the last 5 products viewed in a cookie so it can be displayed as a site-history. The problem I have isn't adding the five initial items to the cookie, its when they view 6, 7 or 10 items. Does anyone have any really decent suggestions on how to tackle this? Curr...

IF EXISTS IN STORED PROCEDURE

hi guys, I am using following storedprocedure set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO Alter PROCEDURE [dbo].[GetUserDetailsByUserID] ( @UserId varchar(100) ) AS BEGIN IF EXISTS(Select * from Registration where UserId=@UserID) BEGIN Select [Name], [UserId], [PermanentAddress], ...

IS it possible to use DTS packages(.dts) instead of ssis(.dtsx) in LoadPackage() ????

Code Class ApplicationTests Shared Sub Main(ByVal args() As String) ' The variable pkg points to the location of the ' ExecuteProcess package sample installed with ' the SSIS samples. Dim pkg As String = "C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Pack...

Dynamically building filepaths in .Net

Is there an easy way of dynamically building a filepath in .Net? At the moment I'm building the filepath by concatenating various strings (from application settings, user input and Date.ToString) but this relies on there not being double '\' characters or illegal characters etc in the strings. Obviously I can manually validate the string...

Active Directory in VB.Net

How can I get a list of computers and their properties from Active Directory using VB.Net and Visual Studio 2008? ...

My rowcommand has no command name for my gridview

I have an image button that is created on rowcreated manually in code. Dim deletecshr As New ImageButton deletecshr.ImageUrl = "\images\bttnDeletemini.gif" deletecshr.ToolTip = "This Will Delete All Cashiers" deletecshr.ID = "deletecshr" In gridveiw_rowdatabound I have the following: Dim deletecshr As ImageButton = Direct...

Implementing NHibernate Unit Test to Generate Schema with VB.NET/MBUnit

Hi, I'm trying to implement unit tests for my NHibernate data access layer. The first test, which I drew from an example I found on the web (http://blogs.hibernatingrhinos.com/nhibernate/archive/2008/04/01/your-first-nhibernate-based-application.aspx), is just trying to recreate the database using my domain classes/mappings. I've been...

VB.NET: label vs picturebox

What is more lightweight control, a label, or a picturebox? (label can contain image too). I will have a form with 110 icons displayed in separate controls and I'm deciding if I should display them in pictureboxes, or a labels. In VB6, there was an Imagebox control which was MUCH more lightweight than picturebox. What is the most simil...

What WinForm Control To Bind List(Of T)?

I have been working on keeping things object oriented for my project. Currently, I'm using a .DLL which supplies all of the app's classes to the WinForms project acting as the presentation layer. My .DLL will, for example, return a SortableBindingList(Of T) to code in a form. The SortableBindingList(Of T) comes from here. Let's assume a...

Syntax Highlight with Word 2007

Is there a way, in Microsoft Word 2007, to set up a style that will highlight VB.NET keywords, just like the Visual Studio IDE does? ...

Faxing PDF file using .Net application

Hi, I developed a windows service to fax files using VB.NET. It is working for the file formats .bmp,.jpeg. But it is not working for the file type .PDF. I am using FaxComLib (COM .dll) to send fax. I am getting following error when the service tries to fax .PDF file. "System.Runtime.InteropServices.COMException (0x80070483): Operation...

Linq to Sql convert to generic list in VB.NET

Hello everybody. I am trying to learn some VB.NET for my coo-op that starts next week, and for that reason i took my portfolio web site that is on C# and just started to converting it to VB.NET to get familiar with the syntax. I am sure my problem is simple however i have a hard time solving it. I am trying to grab data with the linq qu...

Can you pass a "type" as an argument?

I want to do something like the following in VB.NET, is it possible? Function task(value as Object, toType as Type) Return DirectCast(value, toType) End Function ...

ASP.NET Querystrings

Hey guys... I got this code in order to build an url for the link using a querystring from the current page. The problem is.... It doens't work. Any suggestions? <asp:hyperlink ID="link1" runat="server" NavigateUrl='<%@("Equipamentos.aspx?ID_Cliente=")+Request.QueryString ("ID_Cliente").trim.tostring()%>'>Equipamentos</asp:HyperLink>...

How do I force MSBuild to compile for 32 bit mode?

I'm using MSBuild (via NAnt) to compile a bunch of VB.Net assemblies. Because these assemblies depend on COM Interop, I need to guarantee that they run in 32 bit mode on 64 bit OS's. I can get the executable assemblies to compile to 32 bit by changing the project in Visual Studio, but I'd really like to be able to force all of the exec...

Mysterious, ghost-like, impossible-to-find TreeNode text

So I have a TreeView that starts off empty. Sequence of events is as follows: Add a new root node. Code makes the label edit box pop up immediately, and I give it a name. Add a new subnode to that root node. Add a new root node, after the first one. The label edit box pops up, and I give it a name. The second root node takes on its n...

How to find which section of a website is not compatible with new browsers?

I have been tasked to fix a really old website (.net aspx vb). The website currently is not running well in IE8, Firefox, Chrome. The menus are displaying funny and some images are not correct, and in Chrome the complete header with menus and all is missing. I am not a vb guy, and I have no idea where to start looking. What will b...