vb.net

VB.NET ClickOnce failure

I built my application in VB.NET and tried to use the publish feature in VS2008. I uploaded it to my webserver and cannot get the darn thing to work! No matter the client and no matter which method I choose (Publish to cd/dvd or webserver), I always get this error. I can, after some labor, get the application to run by itself, however. ...

vb.net how to check if a network drive is mapped persistently

I use the following code to layout network drives on a system. I want to add a third column for persistence but in vb.net I do not know how to check if a drive has a persistent map or not. Any suggestions? For Each drive_info As DriveInfo In DriveInfo.GetDrives() If drive_info.DriveType().ToString = "Network" Then Wi...

working with SELECT CASE and MOD

please help with some basic syntax i need to make a statement that checks the remainder of a number divided by 4. this is the logic: if the remainder of SOMETHING when divided by 4 is 1 then do this if the remainder of SOMETHING when divided by 4 is 2 then do this etc etc can i get this in SELECT CASE ..MOD format please ...

Why does the Membership.CreateUser function does nothing?

This is the Membership API in .NET 2.0. Suddenly it stopped working on me. I've stripped it to the basics. I get no response when I try to create a user. It goes through the code with no error, but nothing happens. Here is the code in the aspx: Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ...

How to work with multiple updates by linq to sql?

Hi everyone! First of all, I would like to ask if it is possible to do a multiple records editing by linqtosql method in one click event? What I've been trying to do is to edit all the names in the table which are having the same account number. I was able to edit but only one name has been edited and the rest are not,if it is possible,...

LINQ to SQL - selecting a list of the highest version numbers...

I am trying to write some Linq to SQL that will bring me back a list of rows containing a single instance of BaseQuestionIDs but I want the row with the highest version, so, from the following table of data: Id CreatedDate Version BaseQuestionID 2 2009-10-07 13:47:27.687 1 2 3 2009-10-07 13:49:35.010 ...

Retrieve date/time of an http request

Is it possible to retrieve the date/time of a request in ASP.NET (preferably VB.NET)? I have tried HttpContext.Current.Request.Headers.Get("date"), but it returns nothing (null). ...

Retrieving the Windows username from a logged-in machine through an intranet application.

How can an application, running on a production server, access the login username of the machine that a user is accessing an application from? For example, I am currently logged into my machine on the INTRA corporate intranet. My username will be INTRA\Username. I have added specific usernames to a database and wish to check this in...

Informing the user that a DataGridView is being populated

I am writing a program in VB.Net to manage text messages sent through an API. It allows you to view messages in a datagridview and filter by date, sent/unsent etc... To load the messages I'm executing an SQL statement and retrieving a DataTable which then gets set as the DataSource for my DataGridView control. The problem is that depen...

Simple databinding - How to handle bound field/property change. Winforms, .Net.

I have a custom control with a bindable property:- Private _Value As Object <Bindable(True), ... > _ Public Property Value() As Object Get Return _Value End Get Set(ByVal value As Object) _Value = value End Set End Property Any time the field, that Value is bound to, changes, I need to get the type. I ...

vb.net adding a reference

i added itextsharp.dll to my project. it is on my desktop. everything compiles and works fine. if i install my application on another computer it is looking for the same file itextsharp.dll on the users desktop. how do i make it so that the DLL is built in to the project?? ...

VB.NET - Load a List of Values from a Text File

I Have a text file that is like the following: [group1] value1 value2 value3 [group2] value1 value2 [group3] value3 value 4 etc What I want to be able to do, is load the values into an array (or list?) based on a passed in group value. eg. If i pass in "group2", then it would return a list of "value1" and "value2". Also these val...

How to update a database table using ssis?

hi guys, i have successfully run an ssis package and inserted data from one table in the first database to another table in the second database.but all the rows are inserted in this case.i have placed an oledb source control,a character map control and an oledb destination control.no query is written in this.i specified only the source ...

vb.net: "Object reference not set to an instance of an object" when creating user structre

Hi! I get an "Object reference not set to an instance of an object" error while running this code below, and I don't know what is wrong with it.. goes like this: Dim mypoint As New PairOfSingle(0, 0) Private Structure PairOfSingle Dim x As Single Dim y As Single Public Sub New(ByVal xCoordinate As Single, ByVal y...

Cant get text of a DropDownList in code - can get value but not text.

I am using ASP.NET 3.5 I have a dropdownlist called lstCountry with an item in it like this..... <asp:ListItem Value="United States">Canada</asp:ListItem> This will display Canada but in code the value will be "United States". How can i retrieve the value "Canada" also in my code? I have tried all of these and all of them return "Un...

.Net XML Serialization based on an XSD?

Hi, I've been serialising and deserialising .net objects using the XmlSerializer class without problem, however we now need somebody else to look at that data to perform some analysis on it. In order to help with that we've produced an XSD based on our class like so: xsd.exe /t:DataClass Assembly.exe The start of the XSD looks like th...

Enumerate all running databases

I'm writing a little Database administration program. It works fine if you give the db, but not when you don't know which db is installed. How can I enumerate all running databases? e.g. Output of the program: Port xy MS-SQL Server 2005 Port ab Postgre SQL Server Port cd MySQL Server Port ef MS-SQL 2008 Express Server Port gh Oracle...

Implementing .Net RIA Services with Silverlight3 using only existing code/classes?

As my latest questions have stated, i am in a process of researching on Silverlight 3 and its application as a suitable RIA solution to a pre-built project a client of ours wishes to webify. And my experience in .Net and silverlight is about 3 - 4 weeks. I have now become aware of .Net RIA Services. I require to use an existing VB class...

Simplify e-mail body in string?

Hi, I'm just wondering about this one. I'm creating an ASP.NET webform containing lots of textboxes etc. And I want to send an e-mail based on this stuff. And the e-mails body needs to go into a string. And the string is supposed to contain HTML code, but the syntax changes because of the string. So how can I simplify this? Is there a...

Why do simple math operations on floating point return unexpected (inacurate) results in VB.Net and Python?

x = 4.2 - 0.1 vb.net gives 4.1000000000000005 python gives 4.1000000000000005 Excel gives 4.1 Google calc gives 4.1 What is the reason this happens? ...