postback

Why the positions of the elements change on the page after a postback?

Did you have such an experience: I have an asp.net page with couple of div elements on my page. Some of them are floating left and some are separated with <br /> elements. When I put a button which just post-backs and click that, I see that some divs (which were floated to left before) are repositioned to a new line. Any idea about po...

Sending postback to ajax loaded user controls.

I have a set of tabs, which all of them together contain alot of data. I am making the tabs load async. I have one button above the tabs used to save changes. I need this button to send a postback to all the loaded user controls (using this). I need the user control to handle this postback so it can save changes. What do you think? Any ...

Re-Enable button after submit

I'm employing a solution similar to the answer of OnclientClick and OnClick is not working at the same time ? How this currently works is that a file is generated and returned to the client, however after the file is returned the button should become active again. so the response contains the file. But the button does not reactivate. ...

ASP.NET Ajax partial postback and jQuery problem

A control contains some HTML and some jQuery to handle a fancy tooltip to display when you click an image within a div. The control is then used on several different pages, sometimes within an updatePanel, sometimes not. I have the following code to handle loading the jQuery after a partial postback when the control is displayed within...

In JQGrid I want to add a row button that doesnt post back.

The buttons I have added to the rows still post back even if I specifiy not to do so in the onclick method of the button (onclick=' return false;'). I supose its the grid doing the post back? I am tring to prevent the postback and show my own custom popup forms. gridComplete: function(){ var ids = $('#jqGridControl1').jqGrid('getDataI...

List getting cleared every button click inside Update Panel?

No this isn't a copy of this question: http://stackoverflow.com/questions/654423/button-in-update-panel-is-doing-a-full-postback I've got a drop down inside an update panel, and I am trying to get it to allow the person using the page to add users to a list that is bound to a gridview. The list is a global variable, and on page_load I s...

ASP.NET: Button in user control not posting back

I have a simple user control with this code: <%@ Control Language="C#" AutoEventWireup="true" CodeFile="Pager.ascx.cs" Inherits="Pager" %> <table style="width: 100%;"> <tr> <td runat="server" id="PageControls"> <!-- This button has the problem: --> <asp:Button ID="btnPrevPage" runat="server" Text="&la...

Post a form from asp to asp.Net

I have a classic asp application. I want to post a contest form from that page to an Asp.Net form. The reason is that I want to use a lot of logic i have built into an Asp.Net page for validation before entering into the database and I don't know asp very well. Not to mention asp.Net being more secure. What's the best way to accomplish ...

Can I create an ASP.NET ImageButton that doesn't postback?

I'm trying to use the ImageButton control for client-side script execution only. I can specify the client-side script to execute using the OnClientClick property, but how do I stop it from trying to post every time the user clicks it? There is no reason to post when this button is clicked. I've set CausesValidation to False, but this doe...

Scheduler with Asp Mvc

Hi, I want to use a Scheduler like Telerik Scheduler in my Mvc project. The problem is that the Scheduler is a Asp.Net WebForm control. For this reason, I must create a WebForm page in my Mvc project to put the Scheduler control. When I show the page, it work fine to render the layout of the control but if I try to interact with it; c...

Howto add postbackurl equivalent property to <div runat="server" />

I need a div element to cause postback to the server. I can use window.location tough but then I think I won't be able to fire any event back on the server. How can I call the asp.net generated dopostback function properly? Thx in advance ...

Why does my DataGrid flat refuse to reload itself from ViewState on Postback?

I have a DataGrid control that refuses to reload itself from View State on Postback. I've traced this all the way back to the Load event on the control. It just flat refuses to reload from ViewState. It just doesn't do it. The control is situated like this: Webform --> Dynamically loaded User Control (via "LoadControl") ----> Static...

CheckboxList not setting Selected with Viewstate disabled

I have a CheckboxList that seems to load and do everything right, except for when I do a postback, it will not have the Item.Selected property set. I have viewstate disabled for the entire page. I load it like so(inside Page_Load on every load): foreach (DataRow service in d.Tables[0].Rows) { cblServices.Items.Add(new ListItem((str...

Asp with vb.net codebehind, httpfilecollection loses data

I have an html input that i use to upload files. Now on my page when I try to authenticate a user first, and hide the div that the controls are in for my file uploads, the collection is empty. When I dont use runat = "server", it works as expected. Not sure how to get around this. Code: Here is what works...but without hiding... not wha...

LinkButton Click event ignored

I have the following Hyperlink as a button:- <asp:LinkButton ID="loginButton" runat="server" CssClass="loginButton" Text="LOGIN" OnClientClick="return validateLogin(memNoID,pwID)" AddressOf="loginButton.Click"></asp:LinkButton> It causes a postback but only executes the onload and prerender sections of code. It totally ignores the fol...

When radio button selection changes do not cause refresh?

When the selection of the radio buttons change I would like to show/hide the panel in the next table cell. I have it hiding and showing fine but each time it causes the page to refresh to the top. Is their a way to stop that refresh? I would like to hide and show the panel dynamically. <table> <tr> <td> <a...

Chrome frame causes postback to wrong URL and a Server Error in '/' Application error

I have a simple ASP page with no code-behind defined as: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head runat=...

Enable PostBack for a ASP.NET User Control

When I click my "Query" button, my TestID textbox TestIDTxt retained its value, but both myDatePicker's are blank without any value. Question: How do I preserve StartDate.SelectedDate and EndDate.SelectedDate between postbacks? Solution: As suggested multiple times, removing ReadOnly="true" on the DateTxt kept the text value across pos...

ASP.Net ListBox selections not working in Panel?

Hi everyone, I'm having trouble processing a listbox after selecting some items from it. In my markup, the listbox is contained within an asp:panel and is populated during page load in the codebehind. That part works fine. It's when I select various items and submit that I have trouble. My handler loops through the listbox items but...

How to receive modified model value in MVC's Post method?

HI, Does anyone know how can I receive the modified model value which I have bound to controls on view page. For instance I have used a text box on view, as follows- <%=Html.TextBoxFor(model => Model.firstName, new { id = "txtFirstName"})%> But in my post method I am not able to receive the modified value from the text box. Any soluti...