vb.net

VB.NET GroupBy LINQ statement

I am having a bear of a time getting this to work. I have a List(Of MyItem) called Items that have a OrderId property on them. From those items, I want to create a list of Orders. Some items will have the same OrderId so I want to try to group by OrderId. I then want to sort by date. Here's what I have so far: Public ReadOnly Property A...

From client, force whole page validation

I have an ASP button for which I have set the OnClientClick property to display a javascript confirm message. However, I only want this message to be displayed AFTER all of the client side validations have passed. How can I do this? Essentially, I believe that I need to force Page level validation from the client and then, only if it p...

Should I call Dispose() within a function after Return?

Should I call .Dispose() after returning an object that implements IDisposable? myDisposableObject Gimme() { //Code return disposableResult; disposableResult.Dispose(); } In other words, is the object I return a copy, or is it the object itself? Thanks :) ...

ASP.NET Schedule deletion of temporary files

Question: I have an ASP.NET application which creates temporary PDF files (for the user to download). Now, many users over many days can create many PDFs, which take much disk space. What's the best way to schedule deletion of files older than 1 day/ 8 hours ? Preferably in the asp.net application itselfs... ...

How can I add a resource file to the My Project folder in VB.NET?

In C#, I can create and add a new resource file (for another localisation) and drag it into the properties folder. However in Visual Basic, it won't let me do the same thing with the My Project folder. Does anyone know why, or a workaround? ...

VB.net nearest control

Is there an easy way to get the nearest control to a control of choice? I have a picture box and some other moving controls. I want to delete the nearest control to my picture box. So I have to get the position of all controls and delete that with the Location nearest to the Location of my picture box. I'm not sure about how to do that...

What features are heavily used in C# 2.0, but is not available in VBNET 2.0, and how to workaround?

I don't want a war between VB.NET and C# developers, neither is my goal to open a C# VS VB.NET confrontation. I would like you all to list a feature that is heavily used in C#, but is not available in VB.NET 2.0, and how would you work around to achieve a similar behaviour or purpose? For example: C# Accepts void (return) lambda ...

How to make a link button visible after another button has been clicked in asp.net(vb) in button_click()

How to make a link button visible after another button has been clicked in asp.net(vb) in button_click() it says error as "Object reference not set to an instance of an object." i've done this in my code Protected Sub InsertButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Dim receipt As LinkButton = FormView1.F...

Having problems with sqlDataReader

I am using a sqlDataReader to get data and set it to session variables. The problem is it doesn't want to work with expressions. I can reference any other column in the table, but not the expressions. The SQL does work. The code is below. Thanks in advance, Anthony Using myConnectionCheck As New SqlConnection(myConnectionString) ...

how to implement a counter in label which decrements every time page is loaded in asp.net(vb)?

how to implement a counter in label which decrements every time page is loaded in asp.net(vb)? It would be better if that counter value is accessed from and updated into database.. I've tried this on buttonclick but the value is reset automatically to intial value everytime as the button is insert and page is reloaded Protected Sub Ins...

How do you insert 9 MB file into a Blob Field Using Oracle.DataAccess?

Trying to insert a large audio file into an Oracle 10g database and keep getting this error: ORA-01460: unimplemented or unreasonable conversion requested The byte array length of the audio file is 2702577. The procedure works with smaller array lengths, but not the larger ones. Here is my code and Thanks! Dim oracleConnection A...

Remove Border On Focus From Button Control

I am setting my Winforms Button control properties to appear as a hyperlink would on a web page. I've formatted everything fine, except the border in the FlatAppearance object. I have code to act as pseudo-CSS (FormBackColor is a string constant.): b.FlatStyle = FlatStyle.Flat b.BackColor = ColorTranslator.FromHtml(FormBackColor) b.For...

VB.NET one dimensional string array manipulation difficulty

I am having some problems with manipulating a one dimensional string array in VB.NET and would like your assistance please. My objective is to get 4 variables (if possible) from a file path. These variables are: myCountry, myCity, myStreet, Filename. All declared as string. The file location is also declared as string. so I have: Dim f...

VB.NET Disable Parent Window on Show

How can I disable the parent form when I call a child form? This code doesn't disable the parent form like I thought it would: frmChild.ShowDialog() ...

How to retrieve selected value from the dropdown list in asp.net and store it in session variable??

the dropdown list is showing data from database, but how to retrieve the selected value and store it in a session variable?? ...

how to get the selected value of dropdown list of asp.net and store in session variable?

Dim ename As String = DropDownList.SelectedItem.Value this statement is'nt working any help is appreciated!! ...

Is it correct to correct properties values on the fly?

Is it correct to correct properties values on the fly? for example: (note the .ToLower) Public Property X() As String Get Return _x.ToLower End Get Set(ByVal Value As String) _x = value.ToLower End Set End Property ...

Entity Date Modelset Generates Errors in Visual Web Developer

I attempted to add a ADO.NET Entity Data Model to my Visual Web Developer 2010 Express project and it generates but returns a whole slew of errors. Why is this generating errors? Here are the main errors: 'Public Property ID As Integer' has multiple definitions with identical signatures. Method 'Onaddress_IDChanging' cannot be declared ...

Where do I control the behavior of the "X" close button in the upper right of a winform?

I'm venturing into making my VB.NET application a little better to use by making some of the forms modeless. I think I've figured out how to use dlg.Show() and dlg.Hide() instead of calling dlg.ShowDialog(). I have an instance of my modeless dialog in my main application form: Public theModelessDialog As New dlgModeless To fire up t...

how to get column type of datagridview columns in vb.net

How do I show textbox column of datagridview in multiline format using vb.net? ...