Hello,
I'm trying to bind a datasource to a repeater, for instance, to a web service (.asmx from a different website) on page load. The webservice returns a DataSet from an sql call. What is the best way to go about doing this?
...
I have a web application that allows a user to search on some criteria, select an object, edit it and then return to the previous search. All the editing takes place on a separate page linked to the datagrid of returned results. I was wondering what is the best way to store the previous search parameters so that when they return to the...
I see little functional difference between using a property
public readonly property foo as string
get
return bar
end get
end property
or a function
public function foo() as string
return bar
end function
Why would I want to use one form over the other?
Thanks!
...
The following code fails at runtime
Dim Id As Guid = CType(e.CommandArgument, Guid)
It throws this exception
System.InvalidCastException was unhandled by user code
Specified cast is not valid
Why can't I cast e.CommandArgument as a Guid?
...
I was reading an article on MSDN Magazine about using the Enumerable class in LINQ to generate a random array. The article uses VB.NET and I'm not immediately sure what the equivalent is in C#:
Dim rnd As New System.Random()
Dim numbers = Enumerable.Range(1, 100). _
OrderBy(Function() rnd.Next)
...
I've got some RadioButtons in my XAML...
<StackPanel>
<RadioButton Name="RadioButton1" GroupName="Buttons" Click="ButtonsChecked" IsChecked="True">One</RadioButton>
<RadioButton Name="RadioButton2" GroupName="Buttons" Click="ButtonsChecked">Two</RadioButton>
<RadioButton Name="RadioButton3" GroupName="Buttons" Click="Buttons...
I have a VB.NET windows application that pulls information from an MS Access database. The primary role of the application is to extract information from Excel files in various formats, standarize the file layout and write that out to csv files. The application uses MS Access as the source for the keys and cross reference files.
The w...
How to enable assembly bind failure logging (FUSION) in .NET.
...
I have been looking in to doing some test driven development for one of the applications that I'm currently writing(OLE wrapper for an OLE object). The only problem is that I am using the express versions of Visual Studio(for now), at the moment I am using VB express but sometimes I use C# express.
Is it possible to do TDD in the exp...
I have an OLE COM object that trying to write a wrapper for, I have decided to start to use TDD to write the code for it as I believe that it will give me a better sense of direction with what I'm try to write. The COM object has a interface like this:
Interface Mapinfo
Sub [Do](ByVal cmd As String)
Function Eval(ByVal cmd As S...
What's the best practise way to handle a primary key in an unbound datagrid view combo-box column?
I want to display a meaningful value but store only the primary key (much like Access combo-boxes). I achieve this with a regular combo-box by adding an object with two properties into the items collection rather than a plain string. I th...
Not sure if anyone listened to Hanselminutes episodes 134 and 135, but at the end of show 135 Scott Hanselman had a lot of great advice on how to setup a baseline secure environment for a web application. As a developer, most of my time is focused on developing the application, not on the network facet of the project, however as a start...
I am looking for a free WYSIWYG editor control to be used in a Winform application. The applications primary language is VB but using C# is also an option. To clarify I need a rich text editor control that has a formatting bar. I have looked all over the web and the only options I can find are expensive control packages that have more th...
I've been hearing/reading a lot about the new language enhancements for C# 4. I'm a little curious if these same enhancements are also going to be applied to VB as well, or what. Does anyone know where I can get some insight here? With all the new changes happening to C#, it seems like there will very little reason left to be using VB...
I have two vb.net class:
Public MustInherit Class Class1
Private m_sProperty1 As String = ""
Public Property sProperty1() As String
Get
Return m_sProperty1
End Get
Set(ByVal value As String)
m_sProperty1 = value
End Set
End Property
End Class
<ComClass("classid","inter...
I am trying to get my head around a LINQ issue. The ultimate goal is to load tree view with data acquired from LINQ to SQL (view). The issue is when I try to access the data acquired it keeps throwing a "query operator not supported during runtime". The code involved is no more than:
Dim tasklistdata As New lqDataContext
Dim Use...
I've created a .NET solution with two projects:
ToyData (Visual Basic Class Library)
ToyOne (Visual Basic WPF Application)
The ToyData project contains Toy.edmx, an ADO.NET Entity Data Model generated from a database called Toy.
The ToyOne project contains this Window1.xaml.vb file:
1 Imports ToyData
2
3 Class Window1
4
...
I've created a Visual Basic WPF Application project that contains Toy.edmx, an ADO.NET Entity Data Model generated from a database called Toy.
Its Window1.xaml.vb file looks like this:
1 Class Window1
2
3 Private Sub Window1_Loaded( _
4 ByVal sender As System.Object, _
5 ByVal e As System.Windows.RoutedEventArgs...
Are the two events the same or are there differences that we should take note when coding the keyboard presses?
...
I am using VB.Net on Winforms Development developing an MDI application.
In my Parent form, I have a menu strip. In my child forms, I also have a menu strip attached to each form, which invokes a different set of command when accessed. Is it possible then that in an MDI form, the child form which is currently active be the menu that w...