Все вопросы: [postback]

233 вопросов

0
голосов
3ответов
1514 просмотров

Getting ASP.NET ImageButton OnClientClick changes to the server

I use an ASP.NET ImageButton on my website. When a user clicks on the ImageButton, a javascript is fired via the OnClientClick event. The script changes the ImageUrl of the ImageButton. On the same page, I have a submit button. Clicking the button causes a post back to appear. Is there a way ...

0
голосов
3ответов
165 просмотров

so is it a postback or not

I'm causing a postback by clicking an asp:button. I end up in a breakpoint on Page_Load, where IsPostBack == true. Then, one breakpoint later, I end up in Page_Load where IsPostBack == false. What the heck is going on? I'm trying to understand someone else's code.

0
голосов
1ответов
532 просмотров

Dynamic Controls Created from Database Data

I have been working for a couple days trying to figure out how to do this. Working in C# I have a List of data being pulled from various database tables. I want to create different DropDownLists from this data that will persist across PostBacks. One way I was able to tinker through this was to...

0
голосов
1ответов
1469 просмотров

Dynamic usercontrol postback initialization

I have a user control that loads other user controls dynamically. The issue is that on postback my controls don't exist. Now i'm under the impression i have to re-initialize them. Now to do this since they're UserControls and use the ascx file none of the UserControl's controls have been ini...

3
голосов
3ответов
4181 просмотров

Postback intermittently not working with ASP.NET 3.5 and IE?

We have an ASP.NET application that we recently migrated onto a new server with IIS7 and .NET 3.5. In this new environment, some users that are on IE (6, 7, or 8) are experiencing bizarre intermittent problems with postback not working on ASP.NET buttons. (you click the button and nothing happen...

4
голосов
5ответов
15458 просмотров

Stop postback on TextChanged

I have a textbox in an aspx page that has a TextChanged event attached to it. I also have a validator attached to the textbox. When the text is changed, the validate triggers but in case there is an error the textchanged event is still called. Do you know if it's possible to stop the postback on...

25
голосов
6ответов
36226 просмотров

ASP.Net Checkbox value at postback is wrong?

We have a checkbox that is initially disabled and checked. It is then enabled on the client side through javascript. If the user then unchecks the box and presses the button to invoke a postback, the state of the checkbox remains as checked on the server side. This is obviously undesirable behavi...

2
голосов
1ответов
446 просмотров

ASP.Net viewstate questions on form postbacks

Let's assume I have a very simple form, with a submit button and a dropdown list. When I change the list entry and hit submit, at what stage in the postback processing does the viewstate reflect my changed list entry? According to O'Reilly's Learning ASP.Net 3.5, there are two loads taking plac...

1
голосов
2ответов
839 просмотров

Why is my view state not storing a dynamic control adding using Controls.Add?

I'm trying to load a control depending on a category ID that is selected from a drop down list. This is this code i have within a switch statement to show a usercontrol. This was the only way i knew of doing it and having reusable views. I'm open to other methods as i've read a few people saying...

0
голосов
1ответов
179 просмотров

Problem grasping webpart communication

I'm having trouble understanding some web part communication code, and how to make it work as needed. I'm fairly new to web parts, so I figure I'm over complicating it. I have public interface IFormTypeRID { int FormTypeRID { get; } } For this page, I have a ListControl on the left which ...

3
голосов
1ответов
331 просмотров

Linq to SQL - Retain DataContext across post-backs?

I read Rick Strahl's post about DataContext lifetime management, and some of the other related questions on Stackoverflow. If they contained an answer to my question, I must have missed it. I generally follow the atomic approach and instantiate a DataContext for a unit of work when it is needed...

0
голосов
2ответов
2006 просмотров

Autoposting Radiobuttons in ASP.NET MVC view

I'm trying to add a couple of radiobuttons at the top of a View (using ASP.NET MVC). I want the two radiobuttons (option 1 and option 2) to cause the page to be refreshed/autoposted when changed. The two radiobuttons live inside a separate .asxc (Menu.ascx), and added with Html.RenderPartial in...

1
голосов
1ответов
488 просмотров

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...

1
голосов
1ответов
344 просмотров

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 emp...

1
голосов
4ответов
1728 просмотров

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 lit...

1
голосов
1ответов
2470 просмотров

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 t...

0
голосов
2ответов
370 просмотров

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 "confi...

9
голосов
4ответов
16850 просмотров

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 aga...

0
голосов
2ответов
1149 просмотров

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)...

0
голосов
1ответов
1200 просмотров

DataList ItemCreated event

I have a datalist in my aspx page. In the datalist, there are images displayed. When I click on an image, a bigger version of the image appears in a popup, and in this popup there is a button. On that button, I want to react to a click even without postback. What I'm doing now is not working ever...

6
голосов
7ответов
70933 просмотров

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 move...

1
голосов
4ответов
1252 просмотров

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 ...

1
голосов
1ответов
605 просмотров

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 ...

4
голосов
2ответов
3729 просмотров

"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...

4
голосов
4ответов
7414 просмотров

Async. Postbacks cause Page_Init? (C#)

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...

0
голосов
4ответов
1847 просмотров

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 ...

1
голосов
4ответов
3341 просмотров

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 throug...

4
голосов
4ответов
8751 просмотров

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 ex...

0
голосов
1ответов
1828 просмотров

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.

0
голосов
2ответов
167 просмотров

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=...