vb.net

vb.net build action question

i have a question about the properties of build action of files in the project the choices are compile, content, embedded resource, etc etc. can someone please tell me the differences between all of them? ...

how to reference a file that was included in the project in vb.net

in which directory is an image copied when you include it in your project? ...

getting location of installed application vb.net

i published an application in vb.net. the user will be able to install the application anywhere they choose on the computer (or perhaps not anywhere they choose but where ever the default location is). how can i programmatically get the location where the user installed the application? another words i need the application to know where ...

compare a string and trim in vb.net

I have this string that shall come in from another file. The string has maximum length of 102 digits. I need to compare the string with numbers in a pair and delete those from that string. e.g - 6125223659587412563265... till 102 numbers that compare with this string- first set - 61 new string = 25223659587412563265 second set - 36...

Simple ASP.NET Database Query

I have loaded my database with one table under "Data Connections" in the "Server Explorer" pane. What is the standard / best-practices way to handle a simple query in a VB ASPX page? My left <div> would be a set of form elements to filter rows, and when the button is clicked, the main <div> would show the columns I want for the rows re...

Importing a spreadsheet, but having trouble.

I have a form that allows a user to import a spreadsheet. This spreadsheet is generally static when it comes to column headers, but now the users want to be able to include an optional column (called Notes). My code crashes when I try to read the column from the spreadsheet if it doesn't exist. Dim objCommand As New OleDbComma...

Why would the value of the Session object go away?

In ASP.NET/VB.NET 2005 I've created a small web app with two forms. In Default there is a button and a text box and a link. When you press the button whatever is in the text box is put into the Session. Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click System.Web.HttpContext....

subtracting one time from another in vb.net

i have a variable [ Dim mytime = "12:30:00 AM" ] i want to subtract mytime from TimeOfDay and i also want to get the difference as a integer value... how should i do that.. i have added the following code Dim mytime = DateTime.Parse("1:16:00 AM") Dim result = TimeOfDay - mytime dim finalresult = result.Seconds but it is giving me n...

VB.net (aspx) mysql connection

Hey all i am new to ASP.NET and VB.net code behind. I have a classic ASP page that connects to the mySQL server with the following code: Set oConnection = Server.CreateObject("ADODB.Connection") Set oRecordset = Server.CreateObject("ADODB.Recordset") oConnection.Open "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=xxx.com; PORT=3306; ...

ASP.NET User Control Value

I created a DatePicker user control (ASP code below, no code behind) which is simply a textbox, image button, and a sometimes visible calendar. <%@ Control Language="vb" AutoEventWireup="false" _ CodeBehind="myDatePicker.ascx.vb" Inherits="Website.myDate" %> <%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlTool...

Custom property value problem.

My projects involve a number of usercontrols that are actually full blown applications. These usercontrols are designed to be placed onto tab controls. The apps area used by 2 different office locations, so one of the common items found on the controls is a combobox that lists the ID's for each of the 2 offices ('P' and 'G'). I wanted t...

publishing app in vb.net

when i publish an app in vb.net it creates some files: application files directory, app.application, and setup.exe i am going to be distributing this application to people who can barely use a computer, so i need to bundle everything in one, self-extractable package. how can i do this? ...

oRecordset in ASP.NET mySQL problem

I have this mySQL code that connects to my server. It connects just fine: Dim MyConString As String = "DRIVER={MySQL ODBC 3.51 Driver};" & _ "SERVER=xxx.com;" & _ "DATABASE=xxx;" & _ "UID=xxx;" & _ "PASSWORD=xxx;" & _ "OPTION=3;" Dim conn As OdbcConnection = New OdbcConnection(MyConString) conn.Open() Dim MyCommand As New Odb...

.NET: bundling all files in one installation

i have a vb.net application i published it it made an app files diretory, setup.exe, and some other file i need everything to be in one file because the users are not very computer savy is there a way to bundle everything in one installation file? ...

onblur and onfocus attributes for textbox created progrmatically in vb.net

how do i put the onblur and onfocus attributes on a textbox created programatically? here's my code - td = New HtmlTableCell td.Style.Add("padding-bottom", "5px") Dim txtbox As New TextBox txtbox.Style.Add("width", "96%") txtbox.ID = "ename" td.Controls.Add(...

how to change windowXP theme using vb.net2005

I have tried the following code but has no effect: Imports system.Runtime.InteropServices <DllImport("UxTheme.DLL", BestFitMapping:=False, CallingConvention:=CallingConvention.Winapi, CharSet:=CharSet.Unicode, EntryPoint:="#65")> _ Shared Function SetSystemVisualStyle(ByVal pszFilename As String, ByVal pszColor As String, ByVal ps...

Extract data from an Array

Hello, I have an array DetailsArray in VB.NET which contains the result of a LINQ query. I have shown below the values of the array. i need to get the "ProjectID" from the array and assign it to 'ProjID' variable DetailsArray (0){Name = "TestProject1", ProjectID = 10} Dim ProjID as Integer = DetailsArray(??) How would I do th...

how can i show my suggestion box in vb.net

accidently my code suggestion box [ the box when we start typing it shows us code suggestions ] is closed and i don't know how... now how can i enable that ?? ...

If I replace an image in a PictureBox control, should I dispose the original image first? .Net Winforms.

Following on from my question here http://stackoverflow.com/questions/2548664/long-overdue-for-me-question-about-disposing-managed-objects-in-net-vb-net , If I replace an image in a picture box, should I dispose the original image first? Or, what about this situation: Dim bm As New Bitmap(32,32) bm = New Bitmap(32,32) bm = New Bi...

webusercontrol problem

I have one webusercontrol for Datepicker. When I am using this control in content pages it works fine. I have many controls in content page (textbox, label, etc.). All controls are inside a table. I have placed usercontrol inside <td>. When I click on an image, the calendar control is showing. But that time this calender control pushes a...