There is often a need to pass a variable from one Winform to another. There are two scenarios Let us say you have two forms 1. You opened Form1 and then you want to open a new form called Form2 and you would want to carry some information from Form 1 to Form2. The user […]
Error Provider is a cool control which provides visual indications of any errors which you catch. eg. If you have a text box which is supposed to captured the names of people and if someone leaves it blank you can use Error Provider to provide a visual indication of the error. Here is […]
How to allow File Downloads in MVC4 using VB.NET We are using an ActionResult instead of FileResult. Function download(id as Integer) As ActionResult The reason is that if use the FileResult and your file does not exist then it will show a blank page, instead of this we are using an ActionResult which is more […]
VB.NET – You must call the “WebSecurity.InitializeDatabaseConnection” method before you call any other method of the “WebSecurity” class.
Problem description: If you are getting the error while running your MVC4 application in VB.NET You must call the “WebSecurity.InitializeDatabaseConnection” method before you call any other method of the “WebSecurity” class. Solution Add the following line in the GLOBAL.ASX Ensure that you are using the correct connection string and other information as per your […]
There are numerous example for C3 but I had to spend quite some time to adapt it to my project using VB.NET Hope it can be of help to you. I assume that you have already added the GridMVC package from NUGET. Here are step by step guide Controller No change needed , see […]
If you have to select one of the options from various possibilities then your best option is to use the case In VB.NET you would used something like below. Select [ Case ] testexpression [ Case expressionlist [ statements ] ] [ Case Else [ elsestatements ] ] End Select Here is more practical example: […]
I realised that in my MVC5 project in Visual Studio I could not get the Ajax.BeginForm to work properly. It will always do a full postback. I was trying to complete a Video Rating Page, where there are buttons to rate a video and once the user presses one of the rating button, it […]
In VB.NET Use tablControl1.SelectedTab = MyTabName In C# use tabControl1.SelectedTab = MyTabName; MytabName will automatically be displayed.
Learn how to use Applications Settings in Visual Studio 2013 Winform project in VB.NET Here is a simple way of storing applications settings. Step 1 In your Visual Studio Project open the settings. Step 2 When you click on the Settings as shown in Step 1, you would get the following screen. You […]