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 2001
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: 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: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |