Hello,
I am developing an asp.net website. In this I am using a web form say'
Web form1.aspx' which has two button controls say 'button1' and 'button2'.
When I am click 'button1' it displays a text 'Hi'. When I click the other
button 'button2', it redirects to different page say' Webform2.aspx'.
Now if I click the 'Back' menu of the browser, I again get
'webform1.aspx' . Now if I click on 'button1' again then instead of displaying
text 'Hi' it redirects to Webform2.aspx'.
Does any one know why this is happening?
I am using java scripts document.webfor m1.submit( ) method for posting data
back to the server.
Thanks,
Sushi 3 2006
are these ASP.NET buttons or HTML buttons?
possible to post some code? It would be hard to give you a solution without
knowing what is going on in your code.
-- in**@dowhileloo p.com http://dowhileloop.com http://publicjoe.dowhileloop.com -- .NET Tutorials
"sushi" <su***@discussi ons.microsoft.c om> wrote in message
news:80******** *************** ***********@mic rosoft.com... Hello, I am developing an asp.net website. In this I am using a web form say' Web form1.aspx' which has two button controls say 'button1' and 'button2'. When I am click 'button1' it displays a text 'Hi'. When I click the other button 'button2', it redirects to different page say' Webform2.aspx'. Now if I click the 'Back' menu of the browser, I again get 'webform1.aspx' . Now if I click on 'button1' again then instead of
displaying text 'Hi' it redirects to Webform2.aspx'. Does any one know why this is happening? I am using java scripts document.webfor m1.submit( ) method for posting
data back to the server.
Thanks, Sushi
Hello,
I am using HTML controls. When a user clicks on button1, following java
script code is executed
button1_click( )
{
document.webfor m1.submit( );
}
On the page load event
txt.Text = "Hi";
is executed
When a user clicks on button2, following code is executed on the server
button2_ServerC lick( )
{
Response.Redire ct( "webform2.a spx" );
}
Now if I click on button1 first time, I get "hi" message. Then is I click on
'button2, webform2.aspx is displayed. but Now if I click the 'Back' menu of
the browser, I again get 'webform1.aspx' . Now if I click on 'button1' again
then instead of displaying text 'Hi' it redirects to Webform2.aspx'.
Sushi
"sushi" wrote: Hello, I am developing an asp.net website. In this I am using a web form say' Web form1.aspx' which has two button controls say 'button1' and 'button2'. When I am click 'button1' it displays a text 'Hi'. When I click the other button 'button2', it redirects to different page say' Webform2.aspx'. Now if I click the 'Back' menu of the browser, I again get 'webform1.aspx' . Now if I click on 'button1' again then instead of displaying text 'Hi' it redirects to Webform2.aspx'. Does any one know why this is happening? I am using java scripts document.webfor m1.submit( ) method for posting data back to the server.
Thanks, Sushi
Tell you the truth I don't think that Response.Redire ct is JavaScript.
That's .NET.
Make them .NET controls then it will be a lot easer to catch events instead
of trying to do HTML controls.
-- in**@dowhileloo p.com http://dowhileloop.com website development http://publicjoe.dowhileloop.com -- C# Tutorials
"sushi" <su***@discussi ons.microsoft.c om> wrote in message
news:15******** *************** ***********@mic rosoft.com... Hello,
I am using HTML controls. When a user clicks on button1, following java script code is executed
button1_click( ) { document.webfor m1.submit( ); }
On the page load event txt.Text = "Hi"; is executed
When a user clicks on button2, following code is executed on the server
button2_ServerC lick( ) { Response.Redire ct( "webform2.a spx" ); }
Now if I click on button1 first time, I get "hi" message. Then is I click
on 'button2, webform2.aspx is displayed. but Now if I click the 'Back' menu
of the browser, I again get 'webform1.aspx' . Now if I click on 'button1'
again then instead of displaying text 'Hi' it redirects to Webform2.aspx'.
Sushi
"sushi" wrote:
Hello, I am developing an asp.net website. In this I am using a web form
say' Web form1.aspx' which has two button controls say 'button1' and
'button2'. When I am click 'button1' it displays a text 'Hi'. When I click the
other button 'button2', it redirects to different page say' Webform2.aspx'. Now if I click the 'Back' menu of the browser, I again get 'webform1.aspx' . Now if I click on 'button1' again then instead of
displaying text 'Hi' it redirects to Webform2.aspx'. Does any one know why this is happening? I am using java scripts document.webfor m1.submit( ) method for posting
data back to the server.
Thanks, Sushi
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Peter Frost |
last post by:
Please help
I don't know if this is possible but what I would really like to do is
to use On Error Goto to capture the code that is being executed when
an error occurs.
Any help would be much appreciated.
Thanks in advance
|
by: ddd |
last post by:
Hi,
I am having problems with using the DrawToDC of the
MSHTML.iHTMLElementRender in a VB.net application. For some reason I am
getting a "catastrophic error". I am basing the code on c# examples, and I
am not sure what exactly I am doing wrong. From the C# posts it seems that
the drawtodc has a bug and you need to redifine it, so i followed their
advice and specified an interface as below:
|
by: RodBillett |
last post by:
Using SmartNavigation. Windows2003 Server Framework 1.0 (3705) IIS6 and I
have IIS configured to utilize the 1.0 framework.
Any Ideas why I would be getting the following jscript error within
Smartnav.js?
htmlfile: Invalid pointer.
it is occuring on line 79 hdm.appendChild(k);
|
by: Roman |
last post by:
I'm trying to create the form which would allow data entry
to the Client table, as well as modification and deletion
of existing data rows. For some reason the DataGrid part
of functionality stops working when I include data entry
fields to the form: I click on Delete or Edit inside of
DataGrid and get this error: "Error: Object doesn't
support this property or method"
If I remove data entry fields from the form - DataGrid
allows to...
|
by: Wolfgang Kaml |
last post by:
I am not sure if this is more of an expert question, but I am sure that they
are out there.
I'd like to setup a general application or bin directory on my Win2003.Net
Server that will hold some useful utils that more pages on that server can
use.
As an example, I have created a Page Counter class that opens an Access .mdb
file, counts the current entries for that page, and adds a new entry with
some information regarding the current...
| |
by: Joe |
last post by:
I have created a web application using C#. I have done several web
based apps in C# and have not had this problem before. I think this
may be a defect in the VisualSutdio.net2003.
I am using a regualar expression validator on a nested user control
within my page. Everytime I try to compile the app I recieve the
following message.
Microsoft JScript runtime error: 'undefined' is null or not an object
|
by: rushikesh.joshi |
last post by:
Hi All,
I have created my own WebControl and want to add it in my aspx page at
runtime.
it's compiling perfectly, but when i m going to execute, it gives me
error of "Object reference not set to an instance of an object." in my
server control (ascx.cs file)
|
by: pabloazorin |
last post by:
I developed a Date Picker web control using C# and .net framework 1.1
I added my control to Visual Studio 2003 IDE toolbar.
When I drag and drop my control to design web page, the control renders
correctly.
If I change to HTML the generated html is
<cc1:IT24DateTime id="IT24DateTime1" runat="server"
Type="Date"></cc1:IT24DateTime>
.... and that works correctly.
|
by: nathj |
last post by:
Hi,
I'm new to ASP, I normally develop in PHP but this little project requires me to use ASP. Being a newbie in this I've run into some difficulty.
I'm modifying code from a third party. Basicaly there is a site which I am replacing next year with a new branded version and this new site is powered bya DB. However, the existing site needs to be kept up to date as well. So rather than hard code HTMl for the event listing on the existing...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |