vb.net

VB.NET Creating Classes, What is Public Class MyClass(Of Type) ?

I'm still learning ASP.NET and I often see code like this throughout parts of our framework: Public MustInherit Class DBFileManager(Of F As IDBFile, FC As IDBFileContent, FT As IDBFileThumb) Can anybody tell me what this means? Much thanks! ...

How to find out Activex Controls from MS Access DB forms using vb.net

I am developing a Tool in vb.net and need find out Activex Controls from MS Access DB forms. I am able to conut number of controls in form, but unable to get the Activex Controls only from the form. Can any one have any idea how to achieve this, please suggest. Thnaks, ...

.NET Designtime Datasource (for Combobox)

Hi, i'm trying to create a ObjectDataSource which I can use to bind to a BindingSource which on his turn should be bound to a ComboBox. I've created a simple class and a simple list for this class (see below) The Times list class is not showing up at my toolbox, so I cannot drag it to the form so I can select it as the datasource for...

Is there an easy method to read an external web page's source code? ASP.NET

Id like to be able to write a function that reads an external news site and returns the source code of the target page. Any ideas and/or information to get me started? ...

How to tell if SubmitChanges() will actually change anything for a particular entity in LINQ to SQL

I'm trying to determine if any changes were made to a particular entity object. Essentially, I want to know if SubmitChanges() will actually change anything. I would prefer to be able to determine this after SubmitChanges() has been called, but it doesn't really matter. Anyone know how I would do this? ...

How to display Arabic dates in the Gregorian calendar?

I have a multilingual ASP.NET site; one of the languages is Arabic (ar-SA). To switch between cultures, I use this code: Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(Name) Thread.CurrentThread.CurrentUICulture = New CultureInfo(Name) When displaying the date of an article, for example, I just do this, and t...

Can I skip MIME-parsing to get an attachment??

Hi - I am new here so first of all my greetings to you I am writing an application to run on my Windows Mobile (Pocket PC). FYI, I am using VB.NET. My idea is to use my e-mail account with my provider, who gives me a lot GB:s to use, as a virtual online storage disk. In a few words, more or less like the GMAIL-drive which you may have ...

What's the best way to handle "type" tables with LINQ to SQL?

I have some tables that represent various types. They usually just consist of an ID (int), and a name. Ideally I would have this in an enum. Is there a way to map a table like this onto an enum? EDIT: How would I handle it if there were extra fields other than an ID and Name? ...

How do you use ExecuteScalar to return a single value from an Oracle Database?

Been using the code below to return a single record from the database. I have read that ExecuteScalar is the right way to return a single record. I have never been able to get ExecuteScalar to work though. How would I change this to return a single value in VB.Net using ExecuteScalar? Dim oracleConnection As New OracleConnection ...

Best Free Controls for .NET

What Free Controls are there for .NET (both Winforms and Webforms)? ...

How do you read an archived eventlog file?

Are there any libraries or resources available for parsing/reading an archived eventlogs? ...

How to Instantiate ObjectFrame in VB.NET

I am trying to reach methods and properties of ObjectFrame through vb.net. But when I declared this as Dim objOLEObject As ObjectFrame and then trying to instantiate it as ObjOLEObject = New ObjectFrame it shows error like: "429: Retriveing the COM class factory for component with CLSID {3806e95d-e47c-11-cd-8701-00aa003f0f7} fai...

How to read list of string

Hi, I have this: Public stringList As New List(Of String) I need to read the whole list using For each statement, what is the best way to do so using VB.net syntax? Thanks, ...

How many C# vs. VB developers are out there?

As a company it's important to choose which .NET language to go with. Many have chosen C# but are there any actual numbers out there to support going with C# over VB.NET? How many C# developers are out there vs. VB devs. I know that a good developer will be able to work with any language but the choice of language might dissuade a perso...

Render Excel File

Hi, I am actually rendering an excel file in the browser. I use the Response.Writefile(filePath) to dod this. It is working perfectly fine in few of the machines. I am getting a pop up with "Open","Save" and "Cancel" option. But incase of few machines after i do a save click on the popup a plain empty page remains open. This happens o...

Pre compiling a very large regular expression

Hi, I am having a very strange problem. I have a very large regular expression searching for certain words in some text (RegEx looks something like this: (?i)\b(a|b|c|d...)\b; and so on where a, b, c, d, represent words). Anyway, I put it in a pre compiled assembly to speed things up a bit, however the problem is that pre compiled regex...

split a Decimal in vb.net

I am sure this is very simple problem, but I am new to vb.net so am having an issue with it. I have a Decimal variable and I need to split it into two seperate variables, one containing the integer part, and one containing the fractional part. eg for x = 12.34 you would end up with a y = 12 and a z = 0.34 Are there any nice built in ...

SubString function in vb.net throwing Exception

FromIp contains "192.168.1.1". I want to get the last number, but I can't figure out what's wrong here: Dim str As String str = FromIP.Text.Substring(FromIP.Text.LastIndexOf("."), FromIP.Text.Length).ToString() MessageBox.Show(FromIP.Text.Length) ...

Starting process from Web Application

Hi, I am actually trying to start a process for winzip and zip a folder. This i am doing using the below code in vb. Dim startInfo As New System.Diagnostics.ProcessStartInfo Dim pStart As New System.Diagnostics.Process Dim tempFileName As String Try startInfo = New System.Diagnostics.ProcessStartInfo( _ "c:\Program Files\WinZip...

Grouping rows of a datatable in VB asp.net 2.0

Hello, As the name suggests I am trying to group rows in a datatable. To go into further detail this table has identical rows except for one field(column). Basically what I am trying to do is put all the different fields of the identical rows and put them in single field whilst deleting the other rows. Here is the syntax that I am curr...