firing server side button click from client event

Hi,

Is it possible to fire button_click (server side event ) from client side event like page_load etc.

Why I need this because I am doing post back on a page and showing some auditing data  to the user.

Once the user clicks on the back button (on browser) it says page has expired.

Is there any way of avoiding page expiration.

It says cannot submit the information. need to refresh etc.

Is there any way that when user goes back I fire that submit event myself from client side onload event.

Or will it still show page has expired before even my client side onload event is fired.

Please  help.

Buddy

 

 

 

 

 

 

 


thanks,
Buddy
0
happybuddy
2/28/2007 9:16:45 AM
asp.net.client-side 24353 articles. 2 followers. Follow

3 Replies
2292 Views

Similar Articles

[PageSpeed] 35

The page is expired before you get there. It is protect people from double submits of sensitive data. Do you have meta tags or headers set to expire the page?

 Eric


Pascarello.com | Twitter epascarello | LinkedIn
0
A1ien51
2/28/2007 3:02:19 PM

Hello,

I haven't set any meta tag to expire the page.

Its happening by default as i have used postback to display data.

Can i specify something not to expire that particular page

 regards,

Buddy

 


thanks,
Buddy
0
happybuddy
2/28/2007 11:06:59 PM

You either are directing the compiler to not cache the page or you have a global setting in your web.config to do this.

Take a look at these articles and you are sure to find a fix:

http://aspnet.4guysfromrolla.com/articles/022802-1.aspx

http://msdn2.microsoft.com/en-us/06bh14hk.aspx

Hope this helps!  Don't forget to mark the most helpful post(s) as Answer for the sake of future readers.  Thanks!


Josh Stodola ← Come check out my blog!
0
JoshStodola
3/1/2007 3:11:26 AM
Reply:

Similar Artilces:

Firing both Client side event and server side event for server side button
I am having some difficulties getting this to work.. I have button_click (Asp.net) and ClientClick (Javascript).  Javascript is firing fine.  Server script is not. may be you have return return false in the in the javascript which is why its not firing server side event.You should add javascript evelt like thisbutton1.onclientclick = "functionname" Function should nopt return false. Vikram www.vikramlakhotia.comPlease mark the answer if it helped you...

How to access Client Side control in server side button click event?
Hi all, I need to access client side control from server side code. For an example <form id="form1" runat="server"> <table> <tr> <td>UserName:</td> <td><input type="text" id="textBoxUserName" /></td> <td><asp:Button ID="buttonShow" runat="server" Text="show" OnClick="buttonShow_Click" /></td> </tr> </table>   </form> I need to access the textBoxUsername in the server side button click event. How to do that? Than...

what client-side and server-side events are fired when button X is hit?
Folks,In a web aspx page, I use a client-side (javascript) button named "Cancel" so when users hit it, if the data they enter is not saved yet, then this client-side button prompts users to save data before the page is closed. I code this client-side button with event "onclick" and thing like <input type=button ... onclick="btnCancelClick();" >   My question is if users hit the right top corner button X (next to the maximize and minimize buttons also on the top right corner of the aspx web window page), then what client-side (javascript) and serv...

client side click handler / server-side command event doesn't fire
I am rewriting an old control of mine to be more AJAX-friendly. It is a subclass of Button that disables itself when clicked, so that the user can't, say, double post a credit card payment. I have some javascript code for the prototype including this: _onClick : function(e) { if(this.get_element() && !this.get_element().disabled && this._DisableAfterClick == true) { this.get_element().disabled = true; if (this._DisabledText != null && this._DisabledText.length > 0) { this.get_element().value = this._DisabledText; } } //this.get_element().form.s...

How to fire a server side Sub after client side event?
Hi,  How can i fire a server side event after a client side event..? For example, just an example, i want to show a "message box" - The debugging one: MsgBox(stuffs), or calls any other functions which requires the clicked button's id? I took a look on stuffs like getPostBackEventReference()... Did i in the wrong way? Any help or quick sample would be very much appreciated!! :D Hi, you can call the doPostBack (first argument is the control-Id) method, see my code snippet:<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Testpage.aspx.cs" Inhe...

Calling server side sub from client side button click
Hi, I have some javascript in my asp.net page, and a function within that, which is run when the client side form is submitted. What I need is for that function to run, which updates a server side variable, then following that a server side sub should run, using that (newly updated) variable. I have currently set it up with the  onsubmit= tag of the client side form running the first (JavaScript) function, and then the submit button at the bottom of the client side form calling the server side sub with its onClick property. The (probably quite daft!) thinking behind that was that the on...

Call server-side page function from client-side button click
I have an existing ASP application that I am migrating to ASP.net. In the ASP app I was using the Microsoft.XMLHTTP on a the client-side of a ASP page to retrieve data from another asp page using the Microsoft.XMLDOM object. The client page passes 3 tags columns, table and Criteria. The receiving page builds the SQL statement executes the query and returns the row with all the column data. I am trying to convert it over to ASP.NET and I am getting errors on the xmlDOM.Load(Request.InputStream) on DLookup.aspx, the code is listed below. Someone suggested to use System.Net HTTP classes su...

Firing server side validation & Client side confirm with a single button..
Hi All, I have a "Update" asp button. onclick of the button i need to check the server side validations like:if (!IsValidEmail(ctrlEmailAddress.TextBoxControl.Text.Trim())) {MessageBox.Show("Enter valid email address"); validateCheck = false; } After completion of this type of validations, i need to fire one javascript confirmbox saying "Are you sure you want to update this order?" with "Yes/No" options. All these things needs to be done in a single button click. Can any one help me to acheive this ..requirement?  -HemanthPlease rem...

Need to send a id string from client side to server side and fire a event
Hi EveryoneI'm having a problem with my ajax script. I'm trying to send a  id string from client side to server side and want to fire a server side event. I have no clue how to do this. Can anyone point me in the right direction ? Take a look at the GetWebRequest, PostWebRequest, and OnWebRequestCompleted JavaScript samples in the AJAX documentation. Lambert You can add static page methods to an ASP.NET page and mark them as Web methods. You can then call these methods from script as if they were part of a Web service, but without creating a separate .asmx file. To create Web metho...

executing server side code and client side (javascript) code simultaneously while clicking a button
how to execute server side code and client side (javascript) code simultaneously while clicking a button in asp.net. You can't. When clicking a button: the client-side executes, the page does a PostBack, then the server-side executes.NC... what if i want to update a database and then open a new windows is it possible with Jscript.net?...

Help with client side events Vs. server side events
Hi, Can someone look as the following script and tell me why marking the check box doesn't generate a client side event eventhough there's: onclick="checkClick()"? marked.  Thanks in advance, Sivan <%@ Page Language="c#" %><HTML> <HEAD>  <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"> </HEAD> <body>  <SCRIPT language="c#" runat="Server">  void Page_Load(object s, EventArgs e) {  if (!Page.IsPostBack)  {   Label1.Text = Label...

Storing the checked Htmlimputcheckbox values on client side and passing to server side on submit button clicked
Hi All  I've got these bunch of HtmlInputcheckboxes that i'm creating dynamically using div.innerhtml on server side and putting it in a <TD> block, calculate averages etc. Things are working fine until this point. Now i need to get all the checked checkboxes and their values(which are dates in my case) and pass these values back to server side for processing on the submit button click. But i'm using a pagefooter submit button to fire my submit button so i cannot directly pass these values to my submit button onclick method. I tried to use the findcontrol method ...

button click event : how to prevent service code fire from client side script
Button have client side click event and server side click event, my question is: how can I prevent server side click event code execute in conditional from client side script code below: <script language="javascript" type="text/javascript">function Client_onclick() { if (cb.checked == false) do not execute service side code.... elseexecute service side code..... } </script> <form id="form1" runat="server"> <input id="cb" type="checkbox" /><asp:Button ID="Button1" runat="serv...

Calling Client Event From Server Side Click Event
Hi ,Would appreciate if someone could help me out with my issue as below Issue : This whole process Fetching Data from WebService ,Writing a File on Server from it Finally passing the path of file created to Browser so as to give User the option to either Open or Save the File at User end needs to be done in one click event.I am fine with Server event getting everything done but not sure how to open the file for end User.One way is using Window.open(FilePath.However, not sure how I can do all the Server event and then using the FilePath , call client end Window.open()Please suggest.Rega...

Web resources about - firing server side button click from client event - asp.net.client-side

Firing pin - Wikipedia, the free encyclopedia
A firing pin or striker is part of the firing mechanism used in a firearm or explosive device e.g. an M14 landmine or bomb fuze . Firing pins ...

The 10 most common firing mistakes
... entrepreneurs. There was nothing surprising about her kind remarks until the end, when she declared that the course The 10 most common firing ...

Arma 2: Firing Range for iPhone 3GS, iPhone 4, iPhone 4S, iPod touch (3rd generation), iPod touch (4th ...
Read reviews, get customer ratings, see screenshots, and learn more about Arma 2: Firing Range on the App Store. Download Arma 2: Firing Range ...

Me firing the single barrel version - Flickr - Photo Sharing!
Explore robacarp's photos on Flickr. robacarp has uploaded 1421 photos to Flickr.

YouTube - The first ever hand-firing of the world's first fully 3D-printed gun
You are using an outdated browser, which YouTube no longer supports. Since some features on YouTube may not work, you are viewing a lightweight ...

US Navy 'should have been more careful' before firing
Indian defence and state officials say the US Navy should have been more cautious before opening fire on a fishing boat near Jebel Ali.

Daughter may face firing squad over US tourist murdered in Bali
A young woman and her boyfriend may face an Indonesian firing squad after allegedly killing the woman&#8217;s mother and stuffing her body into ...

NRL coaches in the firing line as Ivan Cleary waits in the wings
Fewer new NRL coaches in 2016 means the pressure will be even greater. But who should be feeling the heat most?

FA Cup: Alexis Sanchez firing again for Arsenal
Alexis Sanchez has returned to Arsenal's starting lineup and the scoresheet in Saturday's 2-1 FA Cup fourth-round win over Burnley with manager ...

Shkreli gets court date delayed after firing lawyers
Martin Shkreli, chief executive officer of Turing Pharmaceuticals LLC, exits federal court in New York, US, on Thursday, December 17, 2015. Shkreli ...

Resources last updated: 2/2/2016 2:45:05 PM