Visual Basic 6 Code
Functions/Procedures
InQuotes Function
PauseTime Proc.
Remove Invld Chr Function
Database Insert Proc.
Database Select Function
Database Delete Proc.
Database Update Function
Make Enter key to act as TAB
Time calculation
Change 1st char to Ucase
Populate MSFlxGrid with db data
How to use CASE
Save file
Open file
Populate TreeView w/database
Catch RDO Error
ASP.Net Tips and Tricks
How to CENTER ASP webpage
<style> div.outer { position: absolute; left: 50%; top: 0%; width: 770px; margin-left: -385px; } </style> . . . <body topmargin="0" bgcolor="gainsboro"> <form id="form1" runat="server"> <div class="outer"> . . . </div>
<body style="vertical-align: top; text-align: center" leftmargin="0" rightmargin="0" topmargin="0"> <form id="form1" runat="server"> <table width=100% border=0 style="vertical-align: top; text-align: center"> <tr> <td width=100% style="height: 152px"> <table align="center" border="1" style="width: 798px"> <tr> <td> <p> Center screen, add everything here. </p> </td> </tr> </table> </td> </tr> </table> </form> </body>
The breakpoints are not working
There could be a number of reasons, but the most common reason is extra open IE pages. Close all other IE pages.
Write to text file
Imports System.IO Partial Class _Default Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim fp As StreamWriter Dim myText As String = "File Succesfully Created" fp = File.CreateText(Server.MapPath(".\") & "myFile.txt") fp.WriteLine(myText) fp.Close() End Sub End Class
How to pass var between ASP pages
Dim targetURL As String targetURL = "myNextPage.aspx?" targetURL &= "FName=" & Server.UrlEncode(txtFirstName.Text.Trim()) targetURL &= "&LName=" & Server.UrlEncode(txtLastName.Text.Trim()) targetURL &= "&Amount=" & Server.UrlEncode(txtAmount.Text.Trim()) targetURL &= "&Project=" & Server.UrlEncode(lblProjectName.Text.Trim()) targetURL &= "&Email=" & Server.UrlEncode(txtEmail.Text.Trim()) Response.Redirect(targetURL) Targe Page: myNextPage.aspx (Page_PreRender) event Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender If (Request.QueryString(0) <> Nothing) Then lbl_Name.Text = Request.QueryString(0).ToString End If If (Request.QueryString(1) <> Nothing) Then lblLName.Text = Request.QueryString(1).ToString End If If (Request.QueryString(2) <> Nothing) Then lbl_Amount.Text = "$" + Request.QueryString(2).ToString End If If (Request.QueryString(3) <> Nothing) Then lbl_Project.Text = Request.QueryString(3).ToString End If If (Request.QueryString(4) <> Nothing) Then lblEmail.Text = Request.QueryString(4).ToString End If End Sub
Maintain Scroll Position On Postback Property
Add the following to the page properties of your page MaintainScrollPositionOnPostback="true" <%@ Page Language="VB" .... AutoEventWireup="false" .... MaintainScrollPositionOnPostback="true" Inherits="Link1" title="ASP.Net/Visual Basic Code" %>
Configuration Error
Error: Line 24: Line 25: <system.web> Line 26: <authentication mode="Forms"> Line 27: <authentication mode="Windows"/> Line 28: </authentication> Solution: Make sure you do not have another copy of web.config in another directory.
Web Development
From eCommerce solutions and content management systems to custom applications. We do not use templates.
We design your site to be unique and efficient with the latest technology. We’ll do all the work to bring your custom website to life.
12168
HOME
|
ABOUT
|
CONTACT US
Copyright © 2009 ASP-VBCode