VB Using colons to put two statements on same line
Is it considered bad practice to use colons to put two statements on the same line? ...
Is it considered bad practice to use colons to put two statements on the same line? ...
I am constructing a search function in a class to be used by several of our asp pages. The idea is simple, take a search term from the user and query the database for the item. Currently I am doing this the wrong way, which is vulnerable to SQL injection attacks (and ELMAH is in there to save the day if something goes wrong): Public S...
This is a really simple question and I'm suprised I have to ask it but... How does one declare a readonly local variable in VB.Net? Java and C++ have final/const local variables so I'm sure VB.Net must have them, but I just can't find the syntax for it. ...
The team is familiar with ASP.NET and has been working in VB.NET for several years, but they just haven't made the transition in thinking in terms of objects. In fact, they may be a little intimidated by OOP from brief glimpses they've seen of C++ and unmanaged environments. Work has kept them busy enough that they haven't had time to ...
I'm getting the following error Error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled. I want to put the grid in excel on...
Hello, I have the following code snippet: // Notify the source (the other control). if (operation != DropOperation.Reorder) { e = new DroppedEventArgs() { Operation = operation == DropOperation.MoveToHere ? DropOperation.MoveFromHere : DropOperation.CopyFromHere, Source = src, Target = this, DroppedItems = src...
Do you know any .NET class libraries for querying data in .tel domains? The query/lookup should use the data stored in DNS (a bit tricky) rather than the webservices. I looked at some of the sourcecode on the Telnic developer area but I can't make much sense of it. ...
Hi guys, i have to send emails when a person recieves a personal message on my website and for that i use a StringBuilder to create the HTML markup of the email. also since it is required at many other places as well i have made a Shared Fucntion (i am using VB.NET). now my only concern is that since shared functions are shared among ...
I ve seen a lot of good and "bad" in implementation newsletters. In my opinion Devexpress has good ones. I never clicked the "Having trouble reading this newsletter in your E-Mail client?" because the message is allways displayed correctly. I have also seen "bad" newsletters. "Attachments, pictures, and links in this message have been ...
The title is my question. Basically, I have heard people speak of it before, I understand it to have something to do with vb6, and I know it lets the user code for the application, but I am unable to determine if it is a separate library or built into vb, and I cannot find documentation for it anywhere. Thanks for the help! ...
This must be really obvious, but how do I make a winsock listen to a specific port (recieve data?) I cannot find a method that lets me do so! Sorry that this is probably so obvious. I am trying to make a chat application, which is obviously running in a server/client setup. ...
Hello, I have a windows service which fetches data from various datasources and build a XML file and send it to a webservice. For example first I will get customer details from Oracle Database and build the XML file and then the SQL Server database and build the customer details XML. I am planning to use the same function below to build...
My tcp client has made a connection to the server script! Now that it has connected, how can it send a simple string? I do not know what any of the overloads for the .Client.Send method even mean, or how to use them. I already have a system set up on the server side to parse the string when it is received on the server side, but I have n...
I am using creating a server/client style program, and it uses tcp connections. Now, the server is like this, but it will only listen until it has received its one request. My issue lies in the fact that it only listens till it receives the one message, then closes. The bigger issue, though, is the lag, it will not let me interact with ...
How do I bitwise shift right/left in VB.NET? Does it even have operators for this, or do I have to use some utility method? ...
How do you type binary literals in VB.NET? &HFF // literal Hex -- OK &b11111111 // literal Binary -- how do I do this? ...
Update: I probably confused memory usage issues with the UI sharing same thread as the processing (as pointed out by MusiGenesis below). However regarding the Memory usage. I am still not able to find VB.net specific syntax, although people have pointed out some great .Net and C# information below (and if I were more versed in those te...
I have an object Order with a simple event, Public Event ErrorOccurred(ByVal msg As String) that I raise in the constructor like so when an order cannot be found (along w/setting a boolean error flag: RaiseEvent ErrorOccurred("This order does not exist in the database.") [Error] = True I have a webform subscribed to the order's Er...
I'm kind of torn between these two error-handling models: Create a boolean Error and a string ErrorMessage property for your object. Catch all exceptions internally in the object's methods and pass the messages along using conditional logic from the caller, ie: Dim o As New MyObject o.SomeMethod() If Not o.Error Then 'Do stuff' El...
I have an application in which I am running a separate thread. Dim thread As New System.Threading.Thread(AddressOf Main) thread.Start() However, the thread makes reference to an textbox named Output, and it generates this error upon execution: System.InvalidOperationException was unhandled Message="Cross-thread operation not valid:...