vb.net

PasswordPropertyText not working

I have a SharePoint web part with a web-browsable property that stores a password. I've decorated the property with the PasswordPropertyText attribute but whenever I edit the web part it shows the actual password rather than dots or asterisks. Here is my property declaration: <Personalizable(PersonalizationScope.Shared), _ PasswordPrope...

VB.NET Generic Function

What I want to do is, based on the type of T do different opperations. Below is a simple example of my problem. Public Shared Function Example(Of T)() As T Dim retval As T If TypeOf retval Is String Then Dim myString As String = "Hello" retval = myString ElseIf TypeOf retval Is Integer Then Dim myInt...

Open a Console/Command Window when using VS 2008 Express

I have both the VB and C# versions of Visual Studio 2008 Express. When I run a console application in either version, instead of the console opening in an old DOS style command window like it does in VS 2005, it actually blacks out both monitors attached to my computer and treats the entire screen real estate as the console. Anyone know...

Embed the content from an external file when compiling.

Is there a way in Visual Studio (any version) to embed the content of a file in another file upon compiling? For instance, if one wanted to embed an xml file in a vb code file how would it best be done? ...

Sending/Receiving Faxes in .NET

Hello, I need to send/receive faxes through my web application, and I am not sure where to begin. Basically, a client clicks a button to send a fax, and records in the database under the client's name when a fax is received. Preferably through an API from a service based fax company... I will be hosting this application on a dedicated...

queryinterface for interface failed

I'm using an interoped COM assembly in my 1.1 VB.NET code, and when I try to set a property of the class, I get an INvalidCastException error with the message "QueryInterface for Interface xxx failed". Any ideas on this? ...

a good tutorial for making a vb.net app to read / write SQL db

can someone please recommend some tutorials that show very simple examples on how one can read / rwite to an SQL db? ...

how to convert string to datetime

Hi guys, I have a Session variable in which i have stored one date '22/7/2009'.Now i want to convert value in session to datetime. I tried folowing code: Session("AppointmentDate") = Request.QueryString("ADate") Dim s as datetime=Convert.ToDateTime(Session("AppointmentDate")) But error is showing as 'string is not recognized as a val...

How can I group functions in an ASP.NET class?

I currently have a VB.NET class named "Customers" and it's been steadily growing in size and I now have a couple dozen functions in it. Is there a way of maintaining the functions in the same class? Since they still use common private methods, but group them by similarity. For example: Class Customers -GetData ---GetCustomerObject() -...

SAVE DATA IN DATAGRIDVIEW

Hi, can anyone tell me how to save the data more than one row in data grid view for each time? - vb.net ...

How to send SNMP trap to different IP

I have the an ASCII message of SNMP traps, how can i sent it to different IP address? i dont want to use email instead. Given a IP address and the port, of that receiver machine. PLease tell me the solution or where can i get references to the command at least. coz i could find anything regarding it. PLease...Hope someone can help me.....

Extending an object and any child collections?

Hi, I have an class named Foo. This class contains a collection of child objects of type FooChildBase, but I also have a further class of type FooChildTwo which inherits from FooChildBase. Class Foo Public Children As IList(Of FooChildBase) End Class Class FooChildBase Public Info As String End Class Class FooChildTwo Inherits ...

Problem while trying to retrieve data from checkbox

I am trying to execute the code below to list the select item in a checkbox to the body of the mail Dim CheckedValues As String For Each item In txt_panview0_ddinput1.Items If item.checked Then checkedValues = checkedValues & item.selectedValue End If ...

Logic to Correct an Incorrect User Input (VB.Net)

I am looking for logic that converts an incorrect user input to a correct integer input. For example, a user might mistakenly type in letters within an integer input and the logic changes that input to the correct form(integer). Any ideas? ...

Not retrieving the all selected values from checkbox

Below code is written in such a way to retrieve all selected check box values But its retieve only the first selected value Please help Dim CheckedValues As String For Each item as ListItem In txt_panview0_ddinput1.Items If item.Selected Then CheckedValues = CheckedValues & item.Value ...

Program Automation in Windows using VB.NET 2008

Hi, I am trying to automate a program using Visual BAsic.NET. The idea is to invoke my "Program" at the click of a button, pass inputs to the program and save the results it would generate. For now I can invoke my program using VisualBasic.NET(comands: shell, appactivate), I can pass in data to the program( My.Computer.Keyboard.SendKey...

DataGridView (VB.net) problems, nonvisible rows are still visible and the DataGridView is empty despite having a DataSource

I have several problems with rows in a DataGridView. Background information: The DataGridView (DataGridViewCalib) is in one TabPage of a TabControl, some columns of the DataGridView are automatically DataGridViewCheckBoxColumn as the DataSource have some colums which are Boolean. This is a Windows Form written in VB.Net with Visual Stu...

connecting to a public database through vb.net

i am wondering if there is a public database where you can test your SQL and can connect to? i would like to test a connection to a database using vb.net, and would like to run a few sql statements. ...

document.readyState == "complete" is always false. The state is always "interactive".

I am wiring a startup script JavaScript function on Page_Load to fire like so: ScriptManager.RegisterStartupScript(Me, GetType(Page), "page_init", "page_init();", True) This function calls a couple of different functions to setup the page. One of those functions checks the document.readyState and makes sure it's "complete". This deals...

Multiple "= new" in vb.net with the same variable. Does garbage collection dispose and how?

Dim x as whatever Try x = new whatever(1) something is done with x x = new whatever(2) something is done with x Catch Finally x.dispose End Try What happens to x = whatever(1) Does garbage collection find the pointer to the first new and destroy it or what? ...