vb.net

HTML Email Editor in a Windows Forms Application

We are looking for a WYSIWYG editor control for our windows application (vb.net or c#) so that users can design HTML emails (to send using the SMTP objects in the dot net framework) before sending. Currently all the available editors we can find have one of the following issues: a)They rely on mshtml.dll or the web browser control whic...

Opening a file in my application from File Explorer

I've created my own application in VB.NET that saves its documents into a file with it's own custom extension (.eds). Assuming that I've properly associated the file extension with my application, how do I actually handle the processing of the selected file within my application when I double click on the file in File Explorer? Do I g...

ASP.Net Datagrid: in Footer calculate Avg or Sum for column

I have a datagrid getting bound to a dataset, and I want to display the average result in the footer for a column populated with integers. The way I figure, there's 2 ways I can think of: 1."Use the Source, Luke" In the code where I'm calling DataGrid.DataBind(), use the DataTable.Compute() method (or in my case DataSet.DataTable(0).Co...

Setting Group Type for new Active Directory Entry in VB.NET

I'm trying to set the group type for a new Active Directory Entry via VB.NET and DirectoryServices to create a distribution list. How do I access the ADS_GROUP_TYPE enumerations? Specifically I'm after ADS_GROUP_TYPE_GLOBAL_GROUP. ...

What are the most important functional differences between C# and VB.NET?

Certainly there's the difference in general syntax, but what other critical distinctions exist? There are some differences, right? ...

How can I remove nodes from a SiteMapNodeCollection?

I've got a Repeater that lists all the web.sitemap child pages on an ASP.NET page. Its DataSource is a SiteMapNodeCollection. But, I don't want my registration form page to show up there. Dim Children As SiteMapNodeCollection = SiteMap.CurrentNode.ChildNodes 'remove registration page from collection For Each n As SiteMapNode In SiteM...

Load an XmlNodeList into an XmlDocument without looping?

I originally asked this question on RefactorMyCode, but got no responses there... Basically I'm just try to load an XmlNodeList into an XmlDocument and I was wondering if there's a more efficient method than looping. Private Function GetPreviousMonthsXml(ByVal months As Integer, ByVal startDate As Date, ByVal xDoc As XmlDocument, ByVa...

Differences Between C# and VB.net

Other than syntax, what are the major differences between C# and vb.net? ...

How do I create an automated build file for VB.Net in NAnt?

I have taken over the development of a web application that is targeted at the .net 1.0 framework and is written in C# and Visual Basic. I decided that the first thing we need to do is refine the build process, I wrote build files for the C# projects, but am having tons of problems creating a build file for Visual Basic. Admittedly, ...

Interview question on C# and VB.net similarities/differences

I have been a VB.net developer for a few years now but I am currently applying to a few companies that use C#. I have even been told that at least one of the companies doesn't want VB.net developers. I have been looking online trying to find real differences between the two and have asked on crackoverflow. The only major differences ar...

What is the best way to iterate through a strongly-typed generic List<T>?

What is the best way to iterate through a strongly-typed generic List in C#.NET and VB.NET? ...

Displaying Version Information in a Web Service

Hello, Can anyone suggest a way of getting version information into a Web Service. (VB.NET) I would like to dynamically use the assembly version in the title or description, but the attributes require constants. Is manually writing the version info as a string the only way of displaying the information on the .asmx page? Thanks ...

Create DB table from dataset table

Is it possible (in Vb.Net 2005), without manually parsing the dataset table properties, to create the table and add it to the database? We have old versions of our program on some machines, which obviously has our old database, and we are looking for a way to detect if there is a missing table and then generate the table based on the cu...

Random Int in VB.Net

I need to generate random integer between 1-n (where n is a positive whole number) to use for a unit test. I don't need something overly complicated to ensure true randomnesses - just an old fashioned random number. How would I do that? ...

Cleaning up RTF text

I'd like to take some RTF input and clean it to remove all RTF formatting except \ul \b \i to paste it into Word with minor format information. The command used to paste into Word will be something like: oWord.ActiveDocument.ActiveWindow.Selection.PasteAndFormat(0) (with some RTF text already in the Clipboard) {\rtf1\ansi\deff0{\fonttb...

How to use BITS to download from a UNC path?

Whats the best way to distribute files to users in remote offices, using BITS with a UNC path or BITS with HTTP? I have a VB.NET project which downloads from a HTTP path currently but there is added complexity involved (having a web server, etc). Or is there a better way to do this? Low bandwith usage is more important than speed of sy...

Reserved Keyword in Enumeration in C#

Hi, I would like to use "as" and "is" as members of an enumeration. I know that this is possible in VB.NET to write it like this: Public Enum Test [as] = 1 [is] = 2 End Enum How do I write the equivalent statement in C#? This: public enum Test { as = 1, is = 2 } does not compile. Thanks in ad...

Is there any way to automate windows forms testing?

I am familiar with nunit for unit testing of the business layer however I am looking now to automate the test of the win forms gui layer. I have seen watin and the watin recorder for automating tests on web application by accessing the controls and automating them. However I am struggling to find a watin equivalent for windows forms (...

Filtering out anchor tags in a string

I need to filter out anchor tags in a string. For instance, Check out this site: <a href="http://www.stackoverflow.com"&gt;stackoverflow&lt;/a&gt; I need to be able to filter out the anchor tag to this: Check out this site: http://www.stackoverflow.com That format may not be constant, either. There could be other attributes to the...

Internalize Class and Methods in .NET Assembly

I have a set of multiple assemblies (one assembly is to be used as an API and it depends on other assemblies). I would like to merge all assemblies into one single assembly but prevent all assemblies except the API one to be visible from the outside. I will then obfuscate this assembly with Xenocode. From what I have seen, it is impossi...