It is quite easy to fill the DataGridView programatically in VB.NET. There is no need to use the dataset, Data navigator and other such controls. Here is an example/ There is a Model called Video already defined in my project and I need to display them in a datagrid view. For the purpose of demonstrating […]
Step 1 In Visual Studio Go to Tools > Library Package Manager > Manage Nuget Packages for Solution. Step 2 You would get the following screen, you can check the packages which you have already available in your solution, you can search for new packages and install them to your solution. Remember: These […]
Here is a quick way of filling up and displaying the records from a table in a DataGridView This post assumes that you already have created a EntityModel in your project My Entity Model is called SuperHREntities and I have a table called Employees in it The trick is to you use the .ToArray() after […]
If you are getting this error while trying to use the DataRepeater in you Visual Studio 2010,12,13 project then look for the References under your project, if you project reference has two rows of Microsoft.VisualBasic.PowerPacks then remove one. You should end up with one entry in your references.
To get the list of installed printers on your computer use the following code which will populate a Combo box with the list of installed printers. Private Sub PopulateInstalledPrintersCombo() ‘ Add list of installed printers found to the combo box. ‘ The pkInstalledPrinters string will be used to provide the display string. […]
Here is an example of a stand alone page which can help you to move your traffic to your new page. Just copy the following lines into a note pad , remember to change the url to the actual page where you want to redirect. Save the page with a .aspx extension. eg. If you […]
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 […]
If you have the need to print the address labels then this script will get you started, this is a very simple script which will get you started. You can visit Dymo website site and checkup the SDK for complex scenarios. Assumption I assume that you have already attached a Dymo Label printer to […]
Here is small function which will allow you to send the emails programatically using any SMTP server or you can also use the Google SMTP server if you have a GMAIL account. Function SendMail(ByVal strFrom As String, ByVal strTo As String, ByVal strSubject As String, ByVal strBody As String) As Boolean Dim mailmsg As New […]
Here is a simple code snippet to loop through the records in VB.NET using LINQ The following code example takes the records from an Entity Framework Model named as Video and then allows to loop through each record. Dim List As List(Of Video) List = (From video In db.Videos Order By video.ID […]