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...
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() 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 :)
...
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...
...
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?
...
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...
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()
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...
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)?
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...
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...
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...
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...
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()
...
the dropdown list is showing data from database, but how to retrieve the selected value and store it in a 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?
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
...
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 ...
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 do I show textbox column of datagridview in multiline format using vb.net?
...