Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old March 12th, 2004, 05:11 PM
Registered User
Join Date: Mar 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default refreshing a page...simple im sure but i cant do i

im a novice programmer and i wanted to know you can have a .aspx page that just displays a "Start" button with some text. When the user has read the text and clicked on the "Start" button, the same page is refreshed with a HTML table and the text is removed off the page and replaced by the HTML table.

please help.......

Old March 14th, 2004, 10:57 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts

There are several ways you can do this. You can use a session variable to denote that the user has clicked on the button and hide the text and button or not create it depending on whether or not you create it in the form designer or code-behind file.

You can also write code that creates the button and text on the first page load, then write other code on postback which would be when the button clicked.

Something like:

If Not IsPostBack Then
  'write code to produce text and button
  'write alternate code
End If

This would go in the Page_Load.


Similar Threads
Thread Thread Starter Forum Replies Last Post
page not refreshing Bill Crawley ASP.NET 2.0 Basics 8 February 28th, 2007 11:39 AM
Im getting this error in my web page h3x VB.NET 2002/2003 Basics 2 January 31st, 2005 11:55 AM
refreshing XML withour refreshing the page sasidhar79 XML 1 January 12th, 2005 05:16 AM
Problem In refreshing a page. zaeem Classic ASP Components 2 November 4th, 2003 12:42 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.