Nov 21, 2009

Create Dynamic Html/php Pages Using Simple Vb.net Code - Taking your application data, and creating a webpage for others to vie

free web hosting
Open Discussion > MODERATED AREA > Tutorials

Create Dynamic Html/php Pages Using Simple Vb.net Code - Taking your application data, and creating a webpage for others to vie

iXeta
This example will show you how use a string in VB to create PHP code.
In order to do this, you need a string to store your PHP page and
a function that I will list at the bottom of the page for you to put in
a module. This code is written in VB.NET

Public Sub CreatePage(ByVal HTMLTitle As String, ByVal HTMLText As String, ByVal HTMLFileName As String)
Dim strFile As String

' ----------------------
' -- Prepare String --
' ----------------------
strFile = ""

' --------------------
' -- Write Starter --
' --------------------
strFile = "<html>" & vbNewLine
strFile = strFile & "<head>" & vbNewLine
strFile = strFile & "<title>" & HTMLTitle & "</title>" & vbNewLine
strFile = strFile & "</head><body>" & vbNewLine
strFile = strFile & HTMLText & vbNewLine
strFile = strFile & "</body></html>"
SaveTextToFile(strFile, "C:\" & HTMLFileName & ".html")

End Sub

'///////////////////////////////////////////////////////////////////////////
'// Call this sub using: Call CreatePage("Welcome", "Hello world! This is a dynamic page.", "index")
'///////////////////////////////////////////////////////////////////////////

---------------------------------------------------------------------------
Okay! Now we're done with the sub for creating the page, this is the
only other snippet of code you will need, this needs to go into a
module of your program.
---------------------------------------------------------------------------


Public Function SaveTextToFile(ByVal strData As String, _
ByVal FullPath As String, _
Optional ByVal ErrInfo As String = "") As Boolean

Dim Contents As String
Dim Saved As Boolean = False
Dim objReader As IO.StreamWriter
Try


objReader = New IO.StreamWriter(FullPath)
objReader.Write(strData)
objReader.Close()
Saved = True
Catch Ex As Exception
ErrInfo = Ex.Message

End Try
Return Saved
End Function

---------------------------------------------------
As you can see, the code has a wide range of uses,
such as taking old INI databases from your applications
and being able to turn them into a useable webpage.
Just take the strFile and add onto it with any HTML code
or even PHP, all you'd have to do is change the ending
on the save function inside the CreatePage sub.

Right now I'm working on a program that takes a simple
INI database, a couple arrays, and I'm able to make
a program that updates an online roster with the click
of a button. So instead of copying and pasting 800 times
I'm going back to gaming for an hour.

 

 

 


Comment/Reply (w/o sign-up)

AshTheGamer
Great Tutorial iXeta,

Keep up the Good Work. angel.gif

Comment/Reply (w/o sign-up)



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Similar Topics

Keywords : Dynamic Htmlphp Pages Vbnet Code Application Data Creating Webpage Vie

  1. Test Your Php Pages W/o Upload/internet - complete *working* guide on how to test your php pages (66)
    In this tutorial, I'm going to show you how to test your PHP pages without the Internet or
    uploading the files to your trap17 server. This tutorial is similar to doom's, but the links he
    provided does not work, so I decided to make my own tutorial with working links. The program that I
    will be using for this tutorial is called XAMPP . XAMPP is a modification of the popular Apache
    server, and I'm using XAMPP because of its simplicity to install as well as maintain. The
    current version of XAMPP is 1.4.13 and it has the following bundled in the download: QUOT...
  2. Changing A Dynamic Ip - How to change your dynamic IP. (22)
    In this tutorial I will tell you how to change a dynamic IP if you have Windows XP. First of all go
    to - Start >> Run - and type 'cmd'. A window with a black background and grey text. In
    this window type 'ipconfig' and text should come up saying: IP Address ............. *IP
    HERE* Subnet Mask ................ *SUBNET MASK HERE* Default Gateway .......... *DEFAULT GATEWAY*
    Write this down on a bit of paper on in notepad. You will need them later. Now type
    'ipconfig/release' - this will terminate your internet connection - but don't g...
  3. Custom 404 Error Pages - A Tutorial On How To Make Custom 404 Error Pages (18)
    I've seen a tutorial on here and no offense but it was horrific, this is the real way you do a
    404 Error Page. Make a file called: htaccess.txt Open it up and put this: CODE ErrorDocument
    404 /myerrorpage.html You will need to change myerrorpage.html to whatever your page is called.
    Also when you upload this file to your server you need to rename it to: .htaccess Yes, the dot is
    before the words. You need to do this on the server because on Windows you cannot do that!...
  4. How To Put A Phpbb Login Box On Your Main Site. - Code and .php included!!! (19)
    I have included my coded file with this... Ok here is the code. CODE // //Create login area,
    replace the phpBB2 in /phpBB2/login.php with your forum's //directory //   Prank Place
    Forum Index     Please enter your username and password to log in.        
                  Username:                   Password:      
                Log me on automatically each visit:                    
    I forgot my password         You can test this out on my...
  5. Delete Files And Directories Using Php - following up from creating and writing (11)
    How To Delete Files and Directories follow up from creating them Hello all and
    welcome to my second tutorial involving file management. In my previous tutorial , I explained how
    to create, write and read files. In this tutorial I'll explain how to remove the files and
    directories you took so long to create. I did not explain last time how to create directories as I
    did not know, now I do, you can use the mkdir() function. Now with this tutorial.... Removing
    Files Removing files can easily be done with the unlink() function: CODE unlink("...
  6. Your First Autoit - Learning To Code.. (7)
    Autoit is a simple, yet powerful programming language, it allowed the creation of the pangea
    desktops, and the Remote Pc Control with a cell.. You can learn it too. Here is the first of several
    lessons i will post inside of this topic. It is a 32 bit program, it doesnt work on windows 98, 95,
    and i dont think (THINK) Windows ME Step 1: Download and install the latest version of autoit from
    http://www.autoitscript.com i prefer that you use beta. Step 2: Right click somewhere on your
    desktop or my documents, and mouseover new and click Autoit V3 Script Step 3 (optiona...
  7. Php Form Data And Conditional Statements - My third tutorial (3)
    Intro To PHP Tutorial 3 - Form Data and Conditional Statements Released 4/12/07 By Chris Feilbach
    aka GhostRider Contact Info: E-mail: assembler7@gmail.com AIM: emptybinder78 Yahoo:
    drunkonmarshmellows Website: http://www.ghostrider.trap17.com PART I - FORM DATA One of the
    things that makes PHP so popular is its ability to handle form data. You can do whatever you want
    with it, you can email it to yourself, store it in a database, display it on a page, you can do
    literally ANYTHING with it. There are two ways to send data to your server, GET and POST. Both
    are ...
  8. Simple Javascript And Password System - How to protect your pages with password (10)
    The quickest way to get a password protection system up and running is to use a Prompt box in
    JavaScript that has a title like "Enter your Email Address". Only you and the relevant users know
    what the password should be, could even be one each, that can be sorted out at the next page then
    pass the "input" directly through the url by changing the .href, like
    http://www.iSource.net.nz/users/?leTmeIn= The page that then processes this should also check for
    the referring page, and three fails from an IP if you like the php (the next page): CODE //
    processdownloads.p...
  9. Creating Common Navigation For A Website: Part 2 - Newbies guide to creating common navigation with PHP (0)
  10. How To Start Your First Game Project - The first steps to creating your own game! (1)
    Ok, I see alot of questions around the game development forums of people wanting to make their first
    game, but they don't know where to start. So, I decided to write this tutorial, having been in
    the same situation before. NOTE: This Tutorial: -Is meant to help you get past that initial bout of
    developer's block -Does not teach you how to make a game, just help you start -Cannot help you
    if you cannot answer the questions asked So, let's get to it, shall we? How to start
    your first game project: --So, the first thing you need to make sure yo...
  11. [aef] Most Recent Topics Listing Mod - on your Web-site pages (2)
    Assuming that you have an AEF Forum software installed on your Hosting Account, and that you need
    to display a list of the most Recent Topics to be display, say, on your Index page, then read this
    Tutorial. To begin, Define the variables that you need to connect to the Database and also define
    the URL to the Forum in the prescribed format as follows: CODE //define db information here
    DEFINE ('DB_USER', '  '); // required info DEFINE ('DB_PASSWORD',
    '  '); // required info DEFINE ('DB_HOST', 'localhost'); // required...
  12. Add Flashing Inbox To Invisionfree Forum - Html code for invsiionfree!! (2)
    Do you find it annoying when you are on your invisionfree forum, and you get a new message, and it
    ends up taking you 5 minutes to notice? This code makes the inbox link flash bold red saying how
    many messages you have. In version 1 the word inbox stays the same, and doesnt change at all (for
    Example this is flashing: Inbox (2) In version 2 (the second code) the word inbox changes to
    messages (constantly, so that if you have none, it says messages (0) instead of inbox (0). It still
    flashes Red Put the following In the Header and Body Section (Admin Cp>>>Skinning ...
  13. Getting Started With Amfphp And Rias - first steps in creating RIAs (2)
    AMFPHP in a short way is a library of php files that let u manage in JUST ONE FILE what u would do
    in many files like for example queries to mysql. So u can have tons of queries to mysql and all of
    them in just ONE FILE! so what is a RIA? a RIA is a Rich Internet Application commonly given to
    flash applications, not the animations or presentations we see daily on the internet but very useful
    and cool programs made in flash. the fisrt step u need to take is to download the AMFPHP library
    directly from its site at www.amfphp.org, in some free hosted sites the latest ver...
  14. How To: Make A Simple Php Site - Making one file show up on all pages using php (21)
    I have looked all over the site and could not find anything that was like this simple, or just like
    this at all.. For some people i know that you are using a basic HTML site...and having a big menu
    if you want to add somthing you have to go into every one of the pages and add or remove or edit
    what you want to do, but with somthing verry simple all you would have to do is edit one file, and
    all of the pages that have the PHP script on them would suddenly change to what that one file is.
    So to start off if you are planning on using this little tirck, the page that you a...
  15. Css And Javascript Combined For Dynamic Layout - use of different CSS files at same site (9)
    This tutorial is meant for people that are dealing with problems while coding their site at 100% of
    width. Important notice: Some people has JavaScript disabled, so they will not be able to load CSS
    file (take this in account when creating your website). How this script works. In the HEAD of your
    HTML document will apply this command, so variable.js file will be load at start: CODE
    In browser JavaScript file variable.js is loaded. This Javascript file consist of this parameters,
    copy this code and name it variable.js CODE // JavaScript Document if (sc...
  16. Getting Started With Mysql - creating tables and insert data into them. (2)
    Hi in this tutorial you will learn how to create tables and insert items into them. First steps are
    to create the database - go into your cpanel and mysql databases, from there make an account and a
    database and then attach them together with all priviliges, call the database test and the account
    admin, with the pw as pass - or any other password. We need to connect to the database so first in
    your php file (probably named index.php) - this is how to do it. CODE
    mysql_connect("localhost", "admin", "pass") or die(mysql_error()); mysql_select_db("test") or
    die(mysql_...
  17. Php--> Content-only Pages - Create easy to edit php pages. (9)
    Description Learn to create easy to edit content-only pages with php. By parsing your layout into
    your pages, you can reduce file sizes and files will become much neater. Try it out Ok, lets
    start by creating a file called template.php. CODE //---------------------------------
    //Layout top section //--------------------------------- $top = INSERT CODE FOR TOP OF LAYOUT
    HERE. html; //--------------------------------- //Layout bottom section
    //--------------------------------- $bottom = INSERT CODE FOR BOTTOM OF LAYOUT HERE. html; ?>
    Ok simpl...
  18. Creating A Timer Program - Using Visual Basic 2005 (8)
    This tutorial will explain how to create a basic timer using Visual Basic Express 2005. If you
    don't have it, it's free and you can dowload it from Microsoft's website. All you need
    is a few minutes to sit down and read this and a version of Visual Basic. OK, so what will this
    timer actually do? Well, you are able to enter a number of minutes and a message, and then click a
    button. Once the timer is up, your message pops up and you are reminded! So, basically it's a
    little reminder system. I use it to remind me when TV programmes start, when I have to go ...
  19. Creating Navigation For Html Websites - Have a common navigation menu for the whole website! (12)
    Pre-requisite: HTML, inline frame tags 1 Attachment(.zip) included. Updates : 29-12-07: Doctype
    added in example files (Advised by jlhaslip) Designing a whole website takes a lot of planning
    and organization. Designing a proper navigation system is a basic step in building your website. If
    you are developing webpages in html you would have observed that as you go on creating pages it
    becomes difficult to maintain the links to the pages. This article will guide you in developing a
    common navigation menu for your website. It describes three ways, so if you don'...
  20. [php] Clean Code Functions - Clean up your html output from php scripts (5)
    There is another Topic about writing 'clean' HTML code posted elsewhere on the Forum.
    I'll edit this Topic and add the link so you can review it on your own, and there is no need for
    me to comment on it in this thread, but the purpose of this Topic is to introduce a pair of
    functions which can be used for making sure that the HTML output from my scripts is readable when a
    view-source is reviewed. Two handy functions are included here. They work together quite nicely,
    and I will start this Tutorial with a short summary of the reasons for their 'being...
  21. How To Stop People From Pirating Your Source Codes - How to encrypt your webpage source sode (40)
    /ph34r.gif' border='0' style='vertical-align:middle'
    alt='ph34r.gif' /> -Encryption- /ph34r.gif' border='0' style='vertical-align:middle'
    alt='ph34r.gif' /> If your like me, you probably hate those Javascripts witch open a "Right
    Click Disabled" prompt. An easier way to confuse pirates from stealing your hard worked scripts or
    codes you can easily encrypt your html. In this tut i will show you how to both create
    an html encrypting script and will show you the diffrent methods of encryption. 1. The HE...
  22. Javascript Scroll Bar - A scroll bar for your webpage using javascript (13)
    In this tutorial I will show you how to create two buttons in the bottom left of the screen that,
    when hovered over, will scroll the page. Now to start with, we must create a our buttons, the first
    line will create a div element, or block. Using blocks you can position items anywhere on a page.
    We use the ID property just to let us know what the block is used for, as for the first block, its
    obvious that it contains the vertical buttons and the second two blocks contains the horizontal
    buttons. The style property of the div tag tells the browser how to draw it, in the...
  23. Nice Clean Php Layout Coding. - Learn a nice neat way to code your layouts with php (7)
    There are basically two main ways to code your php. Method 1) Creating a php document with an html
    look. The you throw in include tags all over the place. Its unorganized, and you have lots of stray
    files hidden in folders and scattered in your base directory. Its difficult to organize, and you
    make mistakes easily. Example: This document would be called index.php Whatever
    Banner or something Some content here. Mostly along the lines of You might ask what
    the problem was? Well, those include tags tend to multiply, and so do all those unne...
  24. Adding Data To A Database And Displaying It Later - Using Forms, PHP and MySQL (1)
    Requirements: PHP Support MySQL Database access I am going to use a news program as an example.
    Ok, first you are going to need to connect to the database. Do so by using the code below. I have
    added some comments where you will need to edit to fit your server's specifications. Create a
    new file with notepad and call it config.php QUOTE //Change root to your database
    account's username $dbusername = "root"; //Add your account's password in between the
    quotations $password = " "; //Add the name of the database you are using in between the qu...
  25. Creating A Resume - 10 Tips For Making A Resume (1)
    I've been working on my Resume for months now. Here is a summary of what I've learned: 1.
    Avoid referring to yourself via 1st person or 3rd person terms. Rather than saying "I started this
    job in" just say "Began job in"... Employers expect Resumes to be professional and avoid reference
    to oneself; and instead speaking in an impersonal tone that presents
    achievements/skills/experience/education without personalization. Avoid words like "I", "my", "he",
    "she", etc. Leave out personal pronouns and only use the action words/verbs. This also includes
    your Ob...
  26. Creating A Simple Image Viewer - Using Visual Basic 2005 Express Edition (4)
    I downloaded Microsoft's Visual Studio Express suite a few months ago, but only recently got
    around to installing it. I have been practising with Visual Basic and making some rather basic
    programs and utilities, but they contain most of the basic concepts. This tutorial will explain how
    to create a basic image viewer, and I will try to explain each step from beginning to end as clear
    as I can. To start you will need: Microsoft Visual Studio About 10-20 minutes free time OK,
    first open up the Visual Basic part of the Studio. I am using the 2005 Express version, so...
  27. Dynamic Signature - Yet Another Way To Do It - Create dynamic sigs for multiple users using .htaccess and RewriteRule (0)
    Ever since I connected a program I made in Visual Basic to MySQL database, I had an idea to create
    some sort of a status page... And I did that, where I updated my connection status every 60 seconds,
    updated my Winamp playlist, and several other interesting things... Then, I figured I could create
    an image, and display all that info, and show it on forums, as a signature... And I made a great
    PHP script, that look real fancy, and does the job perfectly... So, I was adding the reference to
    http://status.galahad.trap17.com/stat.php to all the forums... BUT (there's ...
  28. How To Group Multiple Sets Of Data In Microsoft Excel 2007 - (0)
    How to Group Multiple Sets of Data in Microsoft Excel 2007 Sometimes you may open several
    workbooks and work with a number of the same workbooks at a time. You can open this group of files
    with Microsoft Excel 2007 simultaneously. But you have to define them as part of a workspace, and
    save them in a single Excel 2007 file. To do this, follow below steps: 1- Click On the View tab and
    then in the Window group click Save Workspace. The Save Workspace dialog box appears. 2- In the File
    name field, type your work name and then Click Save. 3- At the top-left of window, C...
  29. Programming In Glut (lesson 4) - Creating 3D objects (0)
    Lesson 4 of 6. I hope you are enjoying them /laugh.gif" style="vertical-align:middle"
    emoid=":lol:" border="0" alt="laugh.gif" /> . QUOTE Hello, in this tutorial we will be creating
    a 3D pyramid. We are building this tutorial from Lesson 3, but I took out the 2D objects and placed
    a 3D pyramid in there instead. The 3rd axis for drawing can be a litle confusing, but after you get
    the hand of it you'll do fine. Now when you are setting a 3D vertex just remember that the
    camera is on the positive end of the z axis. So things that have a more positive z axis va...
  30. Programming In Glut (lesson 1) - Creating a windwo (0)
    This is the first of six lessons I am transferring from Astahost for programming in GLUT, and after
    the six I hope to make more, I hope you enjoy. QUOTE Hello, I'm starting a series on how to
    program in OpenGL using the OpenGL Utility Toolkit, a.k.a. GLUT. I chose GLUT because it is quick
    and easy to write, and very easy to learn. In this tutorial I am going to teach you how to create a
    basic window which we will build off of in later tutorials. Throughout the tutorial I will leave
    notes to let you know what each command does, and how you can modify it to fit...



Looking for create, dynamic, html, php, pages, simple, vb, net, code, taking, application, data, creating, webpage, vie
Test Your
Php Pages
W/o
Upload/inter
net complete
*working*
guide on how
to test your
php pages
Changing A
Dynamic Ip
How to
change your
dynamic IP.
Custom 404
Error Pages
A Tutorial
On How To
Make Custom
404 Error
Pages
How To Put A
Phpbb Login
Box On Your
Main Site.
Code and
.php
included!
;!!
Delete Files
And
Directories
Using Php
following up
from
creating and
writing
Your First
Autoit
Learning To
Code..
Php Form
Data And
Conditional
Statements
My third
tutorial
Simple
Javascript
And Password
System How
to protect
your pages
with
password
Creating
Common
Navigation
For A
Website:
Part 2
Newbies
guide to
creating
common
navigation
with PHP
How To Start
Your First
Game Project
The first
steps to
creating
your own
game!
[aef] Most
Recent
Topics
Listing Mod
on your
Web-site
pages
Add Flashing
Inbox To
Invisionfree
Forum Html
code for
invsiionfree
!!
Getting
Started With
Amfphp And
Rias first
steps in
creating
RIAs
How To: Make
A Simple Php
Site Making
one file
show up on
all pages
using php
Css And
Javascript
Combined For
Dynamic
Layout use
of different
CSS files at
same site
Getting
Started With
Mysql
creating
tables and
insert data
into them.
Php-->
Content-only
Pages Create
easy to edit
php pages.
Creating A
Timer
Program
Using Visual
Basic 2005
Creating
Navigation
For Html
Websites
Have a
common
navigation
menu for the
whole
website!
[php] Clean
Code
Functions
Clean up
your html
output from
php scripts
How To Stop
People From
Pirating
Your Source
Codes How to
encrypt your
webpage
source sode
Javascript
Scroll Bar A
scroll bar
for your
webpage
using
javascript
Nice Clean
Php Layout
Coding.
Learn a nice
neat way to
code your
layouts with
php
Adding Data
To A
Database And
Displaying
It Later
Using Forms,
PHP and
MySQL
Creating A
Resume 10
Tips For
Making A
Resume
Creating A
Simple Image
Viewer Using
Visual Basic
2005 Express
Edition
Dynamic
Signature -
Yet Another
Way To Do It
Create
dynamic sigs
for multiple
users using
.htaccess
and
RewriteRule
How To Group
Multiple
Sets Of Data
In Microsoft
Excel 2007
Programming
In Glut
(lesson 4)
Creating 3D
objects
Programming
In Glut
(lesson 1)
Creating a
windwo

Searching Video's for create, dynamic, html, php, pages, simple, vb, net, code, taking, application, data, creating, webpage, vie
See Also,
advertisement


Create Dynamic Html/php Pages Using Simple Vb.net Code - Taking your application data, and creating a webpage for others to vie

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com