dot-nugget

Code and Knowledgebase Site

Code and Knowledgebase Site for Rumery Enterprises, LLC. Tampa Bay area custom software developer

vb.net hastable example

clock October 4, 2010 13:13 by author


        Dim hsh As New System.Collections.Hashtable
        Dim blnCreated As Boolean = False

        hsh.Add("@fname", txtFName.Text.Trim())
        hsh.Add("@lname", txtLName.Text.Trim())
        hsh.Add("@email", txtEmail.Text.Trim())
        hsh.Add("@company", txtCompany.Text.Trim())
        hsh.Add("@password", txtPassword.Text.Trim())
        hsh.Add("@refer", functions.GetCookie("refer"))
        hsh.Add("@entry", functions.GetCookie("entry"))
        hsh.Add("@phone", txtPhone.Text)
        hsh.Add("@countyid", county_id.SelectedValue)
You can pass the hastable to an email function or database crud method and loop thru each item.

Nice when you have an application that adds records to a db or smtp send mail function.



Add a web user control in a master page using jquery (vb.net)

clock August 21, 2010 10:17 by author

The code and steps are in a zip file below.

the code will show you how to wire up a jquery modal popup from a master page. code uses ajaxtoolkit and required field controls.

files you will need

css file

user web control

master page

web form page

links or references to jquery files

 

 



vb.net create class of classes with IList

clock March 14, 2010 12:24 by author
'create class
Public Class PayrollRecord Public Sub New() End Sub Private _inactiveFL As Boolean Private _amount As String Private _userID As String Private _empID As String Private _total As String Public Property InactiveFl() As Boolean Get Return _inactiveFL End Get Set(ByVal value As Boolean) _inactiveFL = value End Set End Property Public Property Amount() As String Get Return _amount End Get Set(ByVal value As String) _amount = value End Set End Property Public Property UserId() As String Get Return _userID End Get Set(ByVal value As String) _userID = value End Set End Property Public Property EmpId() As String Get Return _empID End Get Set(ByVal value As String) _empID = value End Set End Property Public Property Total() As String Get Return _total End Get Set(ByVal value As String) _total = value End Set End Property End Class
Imports System.Collections.Generic
'create generic collection Dim payroll As IList(Of PayrollRecord) = New List(Of PayrollRecord)
'Add records to payroll object. Dim pRoll As New PayrollRecord() pRoll.Amount = Amount pRoll.EmpId = EmpId pRoll.InactiveFl = InactiveFl pRoll.UserId = UserId pRoll.Total = Total payroll.Add(pRoll)
'loop thru each item in the payroll object For Each drow As PayrollRecord In payroll Write(CompId & "," & OrgId & "," & drow.EmpId.Trim & "," & drow.Amount & "," & drow.Total & "," & drow.UserId) Next


Sign in