vb.net

JSON security and encryption

I'm just starting to really get into JSON as a tool for my sites. I was showing my friend how I am calling a WS and returning the data, and he asked me about security of passing JSON data to and from a web service as he saw the data from the "POST" (via Firebug). Many of our public facing sites deal with member information and contai...

Regular expression to find characters in a string and convert them to a number

I may have a string for example potato in a vb.net application. I want to find all the occurrences of o and convert them to 0, so the desired out is: p0tat0. I know it can be done by the provided string operations but I need a regular expression in my scenario. How can this be done? ...

Syntax error converting datetime from character string.

Getting this error when updating a row via a gridview with a sqldatasource in Vb.net/SQL Server 2000. No matter what input (1/1/2010, blank, etc) I give it I can't seem to get it right. Code before the input is passed to the sp: Dim sqldatenull As DateTime Dim DateVerify As DateTime sqldatenull = DateTime.MaxValue ...

Need help with a regular expression

I'm pulling out my hair over the following function: Public Function SetVersion(ByVal hl7Message As String, ByVal newVersion As String) As String Dim rgx = New Regex("^(?<pre>.+)(\|\d\.\d{1,2})$", RegexOptions.Multiline) Dim m = rgx.Match(hl7Message) Return rgx.Replace(hl7Message, "${pre}|" & newVersion, 1, 0) End Function ...

Is there something similar to Source Code Outliner Power Toy for VS2010?

I absolutely love the Source Code Ouliner power toy that I use in VS2005 but am upgrading to 2010 and it seems they haven't yet released a new version. Is there anything similar that shows you a basic outline of the file you are currently navigating? ...

Web Service/Web Config Issues

So I get thrown an exception right when I try to create a new instance of my Web Service that says: "Could not find default endpoint element that references contract 'KBBVehicleService.IVehicleInformationService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application,...

VB.NET Drag Drop If Object Implements Interface

I have to be missing something simple, but my brain is about to bleed on this. I have an interface, for the sake of argument called MyInterface. I Have a Control Class, lets name it "Parent" that implements MyInterface. I have another Control Class that inherits Parent, called "Child" I have a final Control Class lets call it "Contai...

What is the VB.NET equivalent to C#'s 'using' block

I am coding in VB.NET. Currently, I am enclosing object initialization and usage in a Try/Catch block and then tear it down (dispose, close, set to nothing) in the Finally block. The problem is, a C# 'using' block is so easy to use and would clean things up in my code. Is there a VB.NET equivalent? Or is my Finally block tear-down so...

Visual Basic - Command for new my.settings

which the command to add a new My.Settings in visual basic without going into properties? ...

Which is faster - A Using block or Try/Catch/Finally

This is a followup question to this Should I stick with the Try/Catch/Finally construct, or go with the Using construct? Sample Code for Try/Catch/Finally: Dim oRequest As WebRequest Dim oResponse As HttpWebResponse = Nothing Dim dataStream As Stream = Nothing Dim reader As StreamReader = Nothing Dim responseFromServer As String Try ...

Hiding inner classes - What am I missing???

Hi all, Really hope someone can point me in the right direction as I have no hair left anymore... I am developing a simple SDK using VB.NET in VS 2010 and I have a class (OuterClass) that is inheriting another class (InnerClass). There are obviously properties and methods in the InnerClass that are accesible from the OuterClass. ...

.Net Socket Server Page Faults

I have a vb.net asynchronous socket server/listner service that is showing extremely high "Page Faults" in the task manager. Can I please have some feedback as to what this implies and how do I go about resolving the issue? Thanks for all feedback. ...

Is there a call in vb.net I can make to determine daylight savings time?

Is there a way in VB.Net to determine if the timezone the current system has daylight savings time in effect? Of course I can get the offset from GMT using the "z"/"zz" formatting option, but that doesn't tell me if DST is in effect for the current timezone or if the current timezone is in standard time...or if DST/Standard time aren't ...

Drawing a Billboard Quad at point in OpenGL

I'm working on a game engine, and I want to be able to draw a billboarded (i.e. rectangular to the screen) quad with the center-bottom of the quad being determined by a single point. Unfortunately, I have basically no idea how to do this myself, and I haven't had much luck deciphering some of the other tutorials and/or converting them t...

Resource files in VB.NET

I'm currently in the process of merging multiple VB.NET projects into a single Class Library project. In the new Merged project, I've kept a different folder for each of the project that I'm merging. Each of the original project had it's own Resource file. Is it possible that I could keep the different Resource files in different folders...

Compiler executable file vbc.exe cannot be found.

Hello, I am facing the following error in my VB.NET web app: compiler executable file vbc.exe cannot be found. I installed .net framework again and even the IDE, but this error remains. Please help. ...

debugging dll in vb.net web application

I have a vb.net web application in visual web developer 2008 with a dll file and i need to debug a method in that dll. I also have project source files for the dll file itself. How could i make the web application use the source instead of the dll file so that i'd be able to debug it? I've tried debugging the dll project itself, but it's...

Windows forms designer broken in VS2010?

We've recently upgraded from VS2008 to VS2010. The conversion of our vb.net Windows Forms app went well, but we're now having big problems with the forms designer. Pretty much any change to the layout of a form (sometimes just a solution rebuild) will work once, but on recompile, the IDE designer refuses to display the form, the error ...

Inserting records to database from multiple checkboxes in vb.net

I have a table like these: Club Table contains: ClubID(IDENTITY), Name, Address Genre table contains: GenreID and Genre ClubGenre table contains Club ID, GenreID Club has a one to many relationship with Genre I created an application that functions like a database editor. I have a group of checkbox contained in a group box labeled G...

Implement VB With statement in C#

How would you create an extension method which enables me to do the following (warning: exteme pseudo-code)... class FooBar { Int32 Foo { get; set; } String Bar { get; set; } } new FooBar().With(fb => new Func<FooBar, Object>(instance => { // VB With magic // NOTE: The instance parameter HAS to be by reference insta...