vb.net

String.Format escaping VB vs C#

While searching on how to escape a single quote in String.Format, I found the answer at SO: Escaping single quote in String.Format() It seems to be different for VB though. I tested it, and indeed C# needs string s = DateTime.Now.ToString("MMM d \\'yy 'at' H:mmm"); while VB needs Dim s As String = Now.ToString("MMM d \'yy 'at' H:mmm...

What puzzles me...Are .NET languages the mainstream languages for Windows (standalone) applications?

I'm an inquisitive .NET student without any commercial working knowledge and I have been puzzled by what exactlty are .NET languages meant for? Q1.If you look on job websites, .NET seems mainly used for web applications, not much for Windows applications? (My dream job is to develop standalone small Windows applications.) Q2.Are most ...

Hiding Panels and Divs on ASP.NET is making me crazy.

Searching on google, i deffinitly can't find a non-javascript way to show and hide my panel/updatepanel. I do have panels and updatepanels, I want to show/hide them on the fly, after a button click, preferably without javascript, or if so, with jQuery. All the examples I found consumes a lot of code and honestly I don't want to crap ou...

[OleDbException (0x80004005): Not specified error] ASP.net

Hey, I created a button (Next) to navigate in a Table called CHAPTERS; My problem is that the button work Two, and sometimes three times. After that I get [Not specified error]. This is my code : Dim S As Integer = Integer.Parse(Request.QueryString("id")) Dim RQ As String Dim DR As OleDbDataReader RQ = "SELECT ID_C FROM CHAPTRES" ...

How to convert xml data to dataset.

Hi, How can i convert the following xml data to a dataset in vb.net? <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <userinfolist> <UserInfo> <LastName>Thukalil</LastName> <FirstName>Thariq</FirstName> <Email>[email protected]</Email> <Courses> ...

Can I include a Generic type parameter in a lamba expression? (VB.NET 2010)

(Not really sure if I phrased the question correctly...) I want to create a lambda expression that would take an Object, attempt to convert it to a passed-in Type, and print to the console whether it was successful or not. At a glance, the lambda expression may seem a pretty silly way to accomplish this task, but I'd really like to kno...

How to create a simple Dotnetnuke module without DAL

I've been looking for ways to do this for days now ... and its really killin' me ... anyone, please help. I want to create a new module in DNN (VB) ... that; 1. does not use DAL or DAL+ 2. has only one view.ascx control 3. It has to be a compiled module I do not need DB connectivity and any bells and whistles just one view control. I...

How can i select from string?

Dim str as string = "<request id=value1 type=value2>value3</request>" How could select the values as follows... Dim id as string = get the value of id (value1) Dim type as string = get the value of type (value 2) Dim ReadValue3 as string = get the value3 ...

The best way to extract data from a CSV file into a searchable datastructure?

I have a csv file with 48 columns of data. I need to open this file, place it into a data structure and then search that data and present it in a DataRepeater. So far I have successfully used CSVReader to extract the data and bind it to myDataRepeater. However I am now struggling to place the data in a table so that I can filter the re...

How to assign different Switches to different Listeners

Hello, I have an application which uses My.Application.Log to store information at different listeners (to a file, to a remote screen and to a database). I would like to know if it is possible to set a different recording level for each listener. Currently what I have is: <system.diagnostics> <sources> <!-- This section defines the l...

VB.Net - Version numbering in VBPROJ file

Following on from my last question, are the AssemblyMajorVersion, AssemblyMinorVersion, AssemblyRevisionNumber and GenerateRevisionNumber properties required in .vbproj files? All of our components have these entries in the .vbproj files but they are completely out of sync with the AssemblyVersion and AssemblyFileVersion entries in the ...

ASP PasswordRecovery not working

I have an ASP PasswordRecovery module on a page, the code comes up like this: <asp:PasswordRecovery ID="PasswordRecovery1" runat="server"> <MailDefinition From="[email]"> </MailDefinition> </asp:PasswordRecovery> However, when I submit the form I just get the message, "We were unable to access your information. Please try agai...

VB.net: What is the difference between foo=Nothing and foo is Nothing?

In VB.net, what is the difference between if foo is Nothing Then doStuff() End If and if foo=Nothing Then doStuff() End If Update I received the following answer: foo is Nothing simply checks if foo is not assigned to any reference. foo=Nothing checks if the reference held by foo is equal to nothing ...

Using DLL import/Declare in VB.NET with parameter types not used by .NET

I am working on a project where I have to import a DLL file into a VB project that was created a few years back. The DLL was created in C++, and looks like: void CoordinateConversionService::convert( SourceOrTarget::Enum sourceDirection, SourceOrTarget::Enum targetDirection, CoordinateTuple* sourceCoordinates, Accuracy* sourceAccuracy, ...

Name of tool for VB.NET documentation comments

What is the name of the tool that allowed VB.NET code to have embedded documentation comments (corresponding to C# documentation comments) that could be extracted by this tool? I am going through some old code; Visual Studio 2005 era. A trivial example is: 'Form overrides dispose to clean up the component list. ''' <summary> ''' Summ...

check all items under a parent node in Visual Basic

I am trying to check all the childnodes under a parent node, the code I have so far only goes about 2-3 levels deep in the TreeView and I am looking to grab all nodes no matter how deep they are. Could someone shed some insight on this. Below is the code: Private Sub CheckChildNode(ByVal currNode As TreeNode) 'set the children check st...

Variable and loops convertion from VB.NET to C++?

Is there any available tool for converting variable and loops declarations from VB.NET to C++? Thanks in advance ...

P/Invoke: How to know which type to marshall from!?

Is there a one-stop shop for determining which .Net types/attributes to use, given a native type? Example would look something like this: Native Type | .Net Type --------------------------------------- int | Integer int* | IntPtr (or is it ref int?) LPCSTR | [MarshalAs(Un...

Can I pass subset of an array to function in VB.Net?

I have a simple VB.Net Form that acts as an interface to a control library with a public API. One of the API calls takes an Array of UIntegers ByRef: Public Function Get_Values(source_id As Byte, first_value_address As Byte, number_of_values As Byte, ByRef valuesOut As UInteger()) As Integer After the call, valuesOut will hold a list...

VB.NET: Syntax Highlight

Hi, I started to learn VB.NET and I'm trying to do a syntax highlight. The problem occurs when i set the color of selected text. It changes the whole richtextbox's content. Private Sub txtText_TextChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rtbText.TextChanged Dim keywords As ArrayList Dim index...