For the purposes of this question, the code base is an ASP.NET website that has multiple pages written in both C# and Visual Basic .NET. The primary language is C# and the Visual Basic .NET webpages where forked into the project as the same functionality is needed.
Should the time be taken to actually rewrite these pages, including goi...
Is there a way I can create Windows firewall exceptions in VB2005? I'm trying to deploy a small app that opens up a few ports so I can connect to them and convert them using VMWare Converter.
Thanks in advance,
Clint.
...
I am using VB.Net WinForms. I would like to call the Adobe Reader 9 ActiveX control to print some PDFs. I have added the ActiveX control to the VS toolbox (the dll is AcroPDF.dll, the COM name "Adobe PDF Reader". After some experiment the following code works.
Dim files As String() = Directory.GetFiles(TextBoxPath.Text, "*.pdf", Sear...
I need to replace some 2- and 3-digit numbers with the same number plus 10000. So
Photo.123.aspx
needs to become
Photo.10123.aspx
and also
Photo.12.aspx
needs to become
Photo.10012.aspx
I know that in .NET I can delegate the replacement to a function and just add 10000 to the number, but I'd rather stick to garden-variety Reg...
I'm trying to do a very simple INSERT using VB.NET. For some reason I'm getting a SqlException on every insert though. The data is inserted, but still get the following:
Violation of PRIMARY KEY constraint 'PK_User'. Cannot insert duplicate key in object 'dbo.Employee'. The statement has been terminated
When I check in SQL Managemen...
From everything I've read, it seemed that adding paging to a ListView control should be dead simple, but it's not working for me. After adding the ListView and DataPager controls to the form and wiring them together, I'm getting very odd behavior. The DataPager correctly limits the ListView's page size, but clicking the paging buttons do...
In the following snippet, using XmlReader, when I encounter an element. I would like to read it as-is, including all attributes and namespace decoration in the element. Using the oXml.Name property, I am only able to get the tag name. Is there a function to get the tag itself?
oXml = XmlReader.Create(path, oXmlSettings)
While oXml.Read(...
I have a custom control that inherits from WebControl and implements IValidator, but I also want to have a property for ValidationGroup. From research, it appears I need to inherit from BaseValidator to do so. Can anybody provide a successfull example from a ASP.Net custom control that implements both BaseValidator and IValidator?
...
Is there an easy way to display a messagebox in VB.Net with custom button captions? I came across this, in the SO archives, but it's for managed C++
http://stackoverflow.com/questions/77293/what-is-an-easy-way-to-create-a-messagebox-with-custom-button-text-in-managed-c
...
Hello,
I'd like to do the same in C#. Is there anyway of using properties in C# with parameters in the same way I've done with the parameter 'Key' in this VB.NET example?
Private Shared m_Dictionary As IDictionary(Of String, Object) = New Dictionary(Of String, Object)
Public Shared Property DictionaryElement(ByVal Key As String) As...
I'm just learning to work with partial classes in VB.NET and VS2008. Specifically, I'm trying to extend a LINQ to SQL class that was automatically created by SqlMetal.
The automatically generated class looks like this:
Partial Public Class DataContext
Inherits System.Data.Linq.DataContext
...
<Table(Name:="dbo.Concessions")> ...
How do you access the items collection of a combo box in a specific row in a DataGridView?
I'm populating the combo as follows:
Dim VATCombo As New DataGridViewComboBoxColumn
With VATCombo
.HeaderText = "VAT Rate"
.Name = .HeaderText
Dim VATCol As New JCVATRateCollec...
I have a Visual Studio 2008 solution with two projects (a Word-Template project and a VB.Net console application for testing). Both projects reference a database project which opens a connection to an MS-Access 2007 database file and have references to System.Data.OleDb. In the database project I have a function which retrieves a data ...
I want to skin a vb.net app I made ive googled some stuff and I've seen skinned vb.net apps.
However it seems like any time i try to find someone explaining it its a link to a pay for product.
Does anyone have anything useful on this?
...
I have an application that when it first starts i need it to run a database query.
I have all the database queries however forms are all loaded by this method.
dim myfrm as new Form2
myfrm.show.
The thing is if this app has crashed etc i need to make sure its the first initial start of this program
Does anyone have any ideas?
...
Im looking to build a thread manager for an application.
I have already started threading and it works entirely fine but I would like to be able to programatically kill them or get information on them.
Does anyone have ideas?
...
In my database, Concessions have a many-to-one relationship with Firms (each Concession has a FirmID). SqlMetal has captured this relationship and generated the appropriate classes, so that each Concession has a Firm element. I'm binding against a query (simplified here) that returns a list of Concessions along with information about the...
I have a web application at work that is similar to a ticket working system. Some users enter new issues. Other workers choose and resolve issues. All of the data is maintained in MS SQL server 2005.
The users working to resolve issues go to a page where they can view open issues. Because up to twenty people can be looking at this page ...
What's the best mocking framework syntax-wise and capability-wise ?
My problem: Most mocking frameworks use lambda expressions now, which are really ugly to write in VB.NET, so is there any framework that has nice syntax without lambdas or has fluent syntax that doesn't need lambdas?
...
I have a property called "IsSecureConnection" that is part of my object's interface. This makes sense for most implementations of the interface, however, in some implementations I would like to make the property ReadOnly.
Should I omit this property from the object's interface even though it is required by all of the implementations ...