postback

Using JSON or postback method?

I need to develop a page which has 2 dropdownlist. Options of dropdownlist 2 are based on selection of dropdownlist 1. I have 2 methods to change the dropdownlist 2. What will you choose? 1: Postback when users select dropdownlist 1 and change dropdownlist 2. Pros: Can use the postback feature, can use the asp.net validator Cons: Need...

Page Post back initializes the dropdownlist.

I face a weird problem. I have a simple aspx page with a dropdownlist. The dropdown gets filled through a function which is called from Page_Load() event. The dropdown item selection triggers event OnSelectedIndexChanged. Now the event triggers rightly but what happens that upon post back the dropdownlist gets initialized, that is, it sh...

problems with postbacks events from dynamic controls in ASP.Net

I am currently working on a page that has a user control that builds a dynamic table. The control is originally loaded on the Page_Init event, and any time that an event is raised that changes the dynamic control the table is reloaded. The problem here is that if the control is changed between between loads, the events from the control d...

Postback event issues

I'm trying to raise a button_click event in my code behind for a asp:Button, however it only seems to postback when I click it the SECOND time, rather than the first, am I missing something? Below is my code <asp:Button AccessKey="Y" EnableViewState="true" Height="25px" runat="server" ID="myButton" Text="hello" OnClick="clickit"...

Fire async postback from jquery

Is there a way to fire a postback to the server through jQuery? I've tried just putting the postback signature in a .change method on a hiddenfield but it causes a full postback. ...

Asp.Net - page refresh(F5) do not restore the initial value of TextBox

this is the simple code: protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { txt.Text = "Original"; } } first load. text box state is "Original". manually , changing the value to "Not Original". pressing F5. the line: txt.Text = "Original"; is executed but the Input value remain "Not Origi...

Why am I losing object references on the postback?

I am developing an asp.net (3.5) application and I am puzzled with the behavior of the postbacks. Consider the following scenario: I have a web user control that is basically a form. However each form field is a web user control in itself. In the click event of the save button I iterate through all controls in my form and I retrieve t...

JQuery with asp.net 3.5 and doing post/call backs

I currently have a simple form that when you click the "save" button will persist it to the database. I would like to use JQuery to do the callback for me and popup a "Save completed" div window/div of some sort. My only problem is how do I call the btnSave_Click() event from JQuery? If I use PageMethods the method would have to be st...

Async. Postbacks cause Page_Init? (C#)

Hi, I'm experiencing a very strange problem... I have a regular ASP.Net webpage with a page_init and a page_load function. It is my understanding(from everywhere I look) that page_init gets called on the first page load(as in, not ever called in a postback) and page_load is called anytime something happens with the page.(It is very har...

"Validation of viewstate MAC failed" on postback to a different page

I'm working on a web form which works fine as long as it posts back to itself. In Reports.aspx I have: <form runat="server" method="post"> but, when I try to get it to post to a different page: <form runat="server" method="post" action="DisplayReport.aspx"> I get the "Validation of viewstate MAX failed" error. I've tried setting th...

Convert GridView to Object During Postback

I have a GridView inside of a User Control populated from a List of IObject. I need to get the contents of this GridView so I can export the data to CSV. I was just passing the whole GridView to the procedure and looping through it to get the data I needed. I am using MVP though, and was told this was a bad approach. I want to conver...

What can prevent a Postback in ASP.NET?

We have a user who is having problems with a ASP.NET app. The user hasn't been available to gather many details, but at this point our best guess is that the PostBack is not occurring. Something is going wrong between when the user clicks the LinkButton and when the HTTP Request is supposed to be made. (User does have JS enabled) Bey...

URGENT: How to force a postback with asp.net and C#

I have a demo scheduled with a client and i need a quick and dirty fix for now. I will find a more appropriate work around tomorrow but for the time being i need a way to force a post back, or refresh the page. i tried: Response.Redirect(""); but it brings me to a page that says "Object moved to here". 'here' is a hyperlink that bring...

Urlrewriting.net pages are not causing postbacks

I'm using webforms with UrlRewriting.Net to rewrite pages, e.g. http://www.example.com/stuff.aspx?c=30 becomes http://www.example.com/stuff/30-this-stuff.aspx. It works in so far as the correct content is loading; however, none of the postbacks are working (mostly buttons on the page). If I set up a breakpoint on Page_Load, I...

ASP.NET : How can i maintain objects between postbacks ?

How can i maintain objects between ASP.NET page post backs ? I have an ASP.NET web page.when i click one asp.net button, I will call my function (Save ) which will create an object of my custom class (UserDetails class) and save the details to DB.so this is a post back.After the post back again the same page will be displayed to user...

How do I track the click on a button with an external PostBackUrl?

On one of my ASP.NET pages I have several asp:textbox fields. On this page there is a "confirm order" button with an external url set in its "PostBackUrl" property. This works well, and the data is sent to the external site. Here comes the question; how do I know that the user clicked the "confirm order" button on "my side?" (I need thi...

Why does my IE progress bar keep going after every other page load?

I'm seeing this issue. I have a relatively simple ASP.NET page with a gridview and some buttons. When I click a button, the page re-binds the grid and posts back. What's strange is that every other time I click the refresh button, the IE progress bar (in the status area) stays "on", signaling that the user that the page is still loadin...

How do I bind my Jquery function to a asp.net button and still allow Validation and PostBack?

Now I could be going about this the wrong way so if there is a better solution please post that as well. What I am trying to do is disable a button once it is clicked to prevent double clicks. In the past I have done my just disabling the button onclick but with webforms I am running into a little bit of a snag because there is validat...

Asp page force not to postback

I am using Page.RegisterStartUpScript if the user types not acceptable data but i want to force at least some part of my aspx page if not the entire page to not postback. Does anybody has a clue how this can be achieved ? I am using some form to submit data and i don't want those field to be emptied at page postback. ...

ASP.NET: Why is "_requestValueCollection" empty on PostBack?

Why is "_requestValueCollection" empty on PostBack? I have a really strange problem with post backs. In some cases on post backs (this.Request.RequestType == "POST") have null "_requestValueCollection" member. And for ASP.NET that means this.IsPostBack == false. So I have modified the Page_Load in the following way: protected void...