My friend is primarily a VB developer and he says time and time again how much more simple it is to code events in VB than C#. My take on the issue is that it probably is easier but if there was not a reason for the added complexity, they probably would have made it just as simple in C#. Can anyone tell me if there is any added flexibili...
I am trying to deploy a ClickOnce app. It had worked previously when the server was just sitting with .Net 2.0 installed (no SP). Recently the server had 3.5SP1 installed on it and now ClickOnce is failing with the error:
Value does not fall within the expected range inside System.Deployment.
Here is the information posted on the MSDN ...
I need to report progress changed. Consider the following code:
Public Class Calculator
Public Event CalculationProgress (ByVal sender As Object, ByVal e As MyCalculationProgressEventArgs)
Public Function Calculate(..)..
' Perform calculation here ...
' Reporting proggress
Dim args As New MyCalculationProgressEventArgs(myobj, myValue)...
read a lot about DataAdapter, DataTable ,.. to reach to this code, in the Save Button:
'insert new row
ds.Tables("Employees").Rows.Add(ENumTxt.Text, ENameTxt.Text, EPosTxt.Text,
EAgeTxt.Text, ESalTxt.Text, EPhonTxt.Text, EAdrsTxt.Text)
'save changes
ds.AcceptChanges()
Try
If ds.HasChanges Then
Dim AffectedDS As DataSet = ds.Ge...
I have standard .net 2.0 gridview control from which i want to get row keys or cell values from the grid when a row is selected.
I also need to call a method each time a row is selected.
Does anybody know How i can do this using ASP.net & VB?
...
I've been mostly working with VB.Net for over a year and just noticed this
Am I going insane, or does VB.Net NOT have an "Unreachable code" warning?
The following compiles quite happily with nary a warning or error, even though there is a return between the two writeline calls.
Sub Main()
Console.WriteLine("Hello World")
Retur...
Is this possible? Using VB.NET.
Can I do it in the footer maybe? Would that be the best way? Bind the footer to a datatable and throw some blank rows in there?
...
I have some C# code I'm trying to convert to VB.NET. There are some external dependencies I'm referencing in each project. The C# line is
TWriteFileCommand writeFile = (TWriteFileCommand)CommunicationLink.CreateCommand(TOPKernel.TCommand.CommandType.WriteFile);
I don't really understand what the TWriteFileCommand in parathesis after t...
Hi,
how can i get the type of of an object (with GetType) from within the object itself?
Something like GetType(Me) (that, of course, doesn't work).
Thanks.
...
I need to deploy this app and currently the installer the path goes something like "C:\Program Files\Manufacturer\App". I just want it to be "C:\Program Files\App" by default.
I know I can change this manufacturer from the properties for the project, but I want it to go away altogether. The setup project won't build with it gone. An...
I have an XML document that I am deserializing (VB .NET 3.5 Framework), changing some values, and the serializing again. The original document has several XML Comments in it. When I go through all the deserialize/serialize all of the comments are lost. Is there a way to preserve the comments? If not, is there a way to add comments on...
Hi, all.
I wrote a VB.net console program to process CSV record that come in a text file. I'm using FileHelpers library
along with MSFT Enterprise library 4. To read the record one at the time and insert into the database.
It took about 3 - 4 hours to process 5+ million records on the text file.
Is there anyway to speed up the proc...
Hi,
i want to redirect to a special page which shows detailed error message for unexpected errors.Which solution is the best for it in asp.net?Can u give examples? Thanks
...
I am trying to return a binary from the DB using linq for display in the browser. The method below using ado.net works but I am trying to ypgrade to linq but the linq version returned the error.
Public Sub ProcessRequest(ByVal context As System.Web.HttpContext)
Dim imageId As String = context.Request.QueryString("id")
Dim r...
I am getting date as April,1,2009. I want to format the date so that the month is displayed as 4. Not only for the date given above but for whatever date is given. Can anybody give appropriate code?
...
Hi
I have a SqlDataSource that is supplying data to my GridView. Thats all i am using on my form, thus i have NO code behind at all. But somewhere i need a TRY CATCH block just in case my connection get's lost. What code must i place where?
If i get a error i want my lblMessage Text to be "No connection".
Any help would be great!
Reg...
I am attempting to create a generic function that the students in my introductory VB .NET course can use to search a single dimension array of a structure.
My structure and array look like this:
Private Structure Survey
Dim idInteger As Integer
Dim membersInteger As Integer
Dim incomeInteger As Integer
Dim stateStrin...
Duplicate: How to truncate a date in
.net?
I have datetime field containing '4/1/2009 8:00:00AM'. I want to get '4/1/2009' without the time.
...
I've been doing research on reporting suites for a project my company is about to undertake, and have narrowed the candidates down to Active Reports and Crystal Reports.
During the demo yesterday, it was clarified to me that one of the capabilities our client would like is the ability for the end-user to create custom reports integrat...
Hi to all.
Is there a way to have multiline strings in VB.NET like python
a = """
multi
line
string
"""
or php
$a = <<<END
multi
line
string
END;
?
Of course something that is not
"multi" & _
"line
Thanks
...