AJAX :: Stopping Web Method From Firing On Postback?

Jul 27, 2010

I'm inplementing the Cascadingdropdown control from the toolkit. That's all working fine. The user makes their selection from the dropdown and submits the page to return search results to a listview control.

However, I've noticed that all the dropdowns re-populate themselves when the page is posted back. There is no need to reload the controls on a postback, how can I stop that please as it's very annoying?

View 11 Replies


Similar Messages:

AJAX :: PostBack Not Firing In IE8

Mar 21, 2011

I'm having trouble with IE8. The page works fine in Safari and Firefox, but in IE8, I can't get the Submit button to trigger postback - Async or Full. I tried registering the Submit button for Full Postback:

[Code]....

I've had to do this work around before in IE, but clicking the button seems to be doing nothing. I think there might be a JavaScript issue, but I can't figure out what it is - you'll notice the menu controls don't work in IE.

View 1 Replies

AJAX :: Partial Page PostBack Not Firing?

Mar 14, 2011

I have a few Link Buttons on my AJAX enabled page, all basically the same:

[Code]....

Here's the OnClick method they're attached to:

[Code]....

I ensure these LinkButtons trigger Async in my Page_Load method:

[Code]....

Then on the page there are three UpdatePanels (as called in the btnCampus_Click method). All are similar to this (only the ContentTemplate changes):

[Code]....

why the UpdatePanel's aren't triggered when clicked. I've been using UpdatePanels for a long time, but I can't seem to figure this one out.

View 3 Replies

AJAX :: Modal Popup Not Firing The .Show () Method?

Aug 16, 2010

Ive used code that will allow me to find a modalpopup control through code behind and then show it to the user using the Show() method.The code works perfectly fine in some of my pages but not in others!Ive used breaks in my codebehind and it does find the popup and it goes into the Show() method but nothing pops up ?

View 21 Replies

AJAX :: All Controls Firing An Event On First Page Postback

Feb 8, 2010

I have a web application that shows a page containing between 6 and 20 UpdatePanels, contained with Custom Web (.ascx) Controls.

You can see an example of such a page here: [URL]

The problem I'm getting is that when the user FIRST clicks any of the radio-buttons on any of the controls in the page, ALL the radio buttons that have an active selection ALSO fire an rb_CheckChanged event (see application log below). On subsequent radio-button clicks, only that RB fires the event (as expected).

This behaviour is having a dramatic impact on performance. The page loads quickly, and a "normal" RB click provides an AJAX update correctly within 1 second. The problematic first RB click, however, takes up to SIX seconds to process, which is unacceptable from a user experience standpoint.

Developed in VS.NET 2008, ASP.NET 3.5. Also I converted the "Web Site" solution to a "Web Application" (pre-compiled) and got the same performance (still too slow). Release builds run only marginally faster than debug builds.

Why would a single RB selection change cause all RB's that have a "selection" set on them to also fire? (The "selection" is determined through database settings every time the control is populated, which is called from within the parent page control's Page_Load function. This selection is determined also at first page load, since all the controls get populated then, so why would the clicking of an RB cause them all to fire an event, and only once? That's what I don't get...)

[Code]....

View 3 Replies

C# - Validation Controls In User Control Not Stopping Page Postback?

Jan 28, 2011

I have a asp button and a user control containing custom validator in it when i click the button that is present on the page not inside the usercontrol, the user control client side validation occurs and displays the javascript method regarding data entry failure but when i click the javascript alert box ok button, the postback gets occured automatically i want to stop the postback if the user control contains invalid data in iother words the postback get occured only when the user control contains the valid data.

I have already done this type of coding in javascript:

function CheckTimeRangeTo_9(sender, args) {
var e = document.getElementById('<%= ddTimeTableTo_9.ClientID %>');
var totalToTimeInMins = CalculateTotalMinutes(e.options[e.selectedIndex].value);
var totalFromTimeInMins = CalculateTotalMinutes(args.Value);

[Code]...

View 2 Replies

AJAX :: Postback Method Updates Entire Page

Feb 19, 2010

I don't know why, but even using update panel, my postback method updates the entire page. I'm using a master page with aspScriptManager inside.
My ASP.Net code:
<div> <asp:UpdatePanel ID="updProva" runat="server">
<ContentTemplate> <asp:Panel ID="pnlProva" runat="server">
</asp:Panel> </ContentTemplate> </asp:UpdatePanel> </div>

The CodeBehind (C#) creating some RadioButtonList controls in my ASP.Net page, I'll post the main function and de Page_Load:
createTest function
[Code]....
Finally, the Page_Load:
[Code]....

View 2 Replies

JQuery :: Uframe Postback Button Control Getting Postback The Page Even The Client Side Method Call Also?

Jan 28, 2011

iam using the Jquery Uframe with asp.net project.Iam getting a postback problem here.

In side the uframe ,button control getting postback the page even the client side method call also.

i tried with the Html button Control also by setting the type="submit" ,iam facing the same problem.

And I got very limited reference about the uframe(codeflex,codeProject).

View 6 Replies

C# - Webhandler Not Firing On Postback?

Jan 11, 2010

I have a web application that I upload an image to, the image is subsequently saved to the server's temp folder and displayed via a webhandler on the aspx page.

the code for the aspx:

<img src="PreviewImageQualityHandler.ashx" alt="Picture not loaded" runat="server" id="imagePreview" />

The code for uploading the picture and adding a unique id to the Session:

protected void uploadButton_Click(object sender, EventArgs e)
{
if (FileUploadControl.FileName.EndsWith(".jpg") || FileUploadControl.FileName.EndsWith(".jpeg"))
{
string tempFileName = Path.GetTempFileName();

[Code]....

My problem is that the webhandler only fires on the first image-upload. If I try and upload a new image, the webhandler never fires.

If I remove everything to do with Session from the webhandler it fires on every single postback, like it should.

View 1 Replies

Web Forms :: LinkButton ClickEventHandler And Firing A Method?

Sep 30, 2010

I am dealing with a situation where I have a linkbutton which fires a ClickEventHandler.

<asp:LinkButton ID="LinkButton1" runat="server" CommandArgument="LinkButton1" OnCommand="lb_Command">LinkButton1</asp:LinkButton>
public delegate void ClickEventHandler(object sender, CommandEventArgs e);

View 2 Replies

Web Forms :: Page_Init Firing On Each Postback?

Sep 23, 2010

I am having a problem with web pages in a .Net site where the Page_Init is firing on each postback rather than the normal behavior (Page_Init fired initially, and only Page_Load fired on postbacks)

Several comments:

1. AutoEventWireup is set to false on all pages, with a "Handles Me.Init" set on Page_Init. All events are defined with the "Handles" verb as shown below

2. Each web page is subclassed to a parent class which provides strongly-typed access to the contents of session variables.

3. The Page_Load event for most of the pages performs a DataBind operation on a gridview control.

Partial Public Class SamplePage
Inherits PageManager (PageManager inherits from System.Web.UI.Page)
Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
...
End Sub

View 1 Replies

C# - Is There Any Way To Stop Method From Firing When The F5 Refresh Button Is Clicked

Mar 30, 2011

I have a button that has click event in my C#. This works great. However afetr pressing F5 to refresh the page I noticed the button event is fired. This occurs every time I click F5. I've added if(page.IsPostBack) and the method still runs.

Is there any way to stop method from firing when the F5 Refresh button is clicked?

View 5 Replies

Web Forms :: Page Load Method Is Firing Two Time?

Apr 21, 2010

I have as asp.net website the code behind is C#.

i my application Page load method is firing two time.

View 4 Replies

How To Prevent PostBack Event Handler From Firing

May 3, 2010

I have a custom class (ServerSideValidator.vb) that validates user input on server side (it doesn't use any of the .NET built in validators, therefore Page.Validate() is not an option for me). I am calling the Validate() method on page.IsPostback event and the class performs without any problem

My issue is, when validation fails (returns false), I want to stop the postback event handler from firing, but load the page along with all the controls and user-input values in them. If I do, Response.End(), the page comes up blank. I can programmatically instruct the page to go to the previous page (original form before postback), but it loses all user-inputs.

I thought of creating a global boolean variable in the page code behind file and check the value before performing any postback method, but this approach takes away from my plan to provide all functionalities inside the class itself. The page object is being referenced to ServerSideValidator.

Seems like all the postback related properties/variables I come across inside Page class are 'Readonly' and I can't assign value(s) to control/prevent postback event from firing.

View 1 Replies

JavaScript - Control Event Handler Not Firing On Postback?

Apr 12, 2010

I have a control which has an ImageButton which is tied to an OnClick event... Upon clicking this control, a postback is performed and the event handler is not called. AutoEventWireup is set to true, and I've double checked spelling etc.... We haven't touched this control in over a year and it has been working fine until a couple of weeks ago.

We have made changes to controls which load this control... so I'm wondering, what kind of changes could we have made to stop this event handler from being called? There is quite a bit of Javascript going on, so this could be the culprit too...

View 5 Replies

Web Forms :: URL Routing & PostBack Not Firing BeginRequest Event

Sep 13, 2010

we are having some weird issues with URL Routing in ASP.NET 3.5.

We have a search box that does a search and redirects to a routed URL.

When we search for the first time (aka Press a button that forces a postback) everythign works as expected. we get:

1. BeginRequest event.

2. Determines Route

3. Calls Routehandler to match the route item to the actual destination page

4. Routes the url appropriately.

After you do one search successfully and try again it fails to call the BeginRequest event. Because of this the routing data never gets called and so the url is never routed to its correct destination. What is weirder still if we append a "/" (trailing slash) to the url after the initial postback it DOES work properly again.

So our search route looks like this

mydomain.com/Search

entering a term and pressing the SEARCH button would yield a result url like this:

mydomain.com/Search/Results/MySearchTerm

Going back (after 1 successful search) you then need to use this url or else BeginRequest will never fire:

mydomain.com/Search/ < (note the extra "/" at the end)

why the BeginRequest event never fires unless the slash is appended?

View 1 Replies

VS 2010 Dynamic UserControl - Postback Event Not Firing

Feb 8, 2012

I have a page where I add a dynamic user control in the Page_Load event based on criteria.

The control is a simple form with a save button. The problem is the _Click event never fires for the button. It will postback the main page the control is within, but not the code behind for the control...so I never get the button click even, and therefor can't execute the save code.

Tried it in the init, tried adding the control to a placeholder, tried a lot of various things but nothing seems to work.

Code:
If cb_business_profile.Items.Count = 0 Then
Dim u_pnl_content As UpdatePanel = Page.FindControl("u_pnl_content")
u_pnl_content.ContentTemplateContainer.Controls.Clear()

Dim business_profile_detail As Control = LoadControl("~/controls/business_profile_detail.ascx")

[Code] ....

View 3 Replies

Forms Data Controls :: Rowdatabound Event Is Not Firing During Postback?

Aug 17, 2010

rowdatabound event is not firing during postback ,What to do?First time pageload I am getting result as expected. When I click checkbox ,which is in grid ,my values which are in other columns get disappeared, that means during postback. How to maintain values in the grid even after postback.note : I did some small manupulation of data during rowdatabound event for the columns which are in the grid.

View 6 Replies

Dynamically Displayed Usercontrol Not Firing Postback Event On Select?

Aug 20, 2010

i have a very strange issue with a user control we are dynamically loading on an asp.net web page(.net 2.0). the user control has 3 dropdowns, one of which has a selectedindexchanged event attached to it (which loads the third dropdown with a set of values).

the weird thing is, if there are currently any invalid fields (where field validators have been activated) in other parts of the form, when you go to select the drop down in question on the FIRST change it does nothing, but then when you change the index again it works perfectly! i dont understand how the event wont fire for the first change, but for every change thereafter.

However, if all these fields are filled in correctly above the usercontrol, it fires off the selectedindexchanged event correctly.

in regards to validation i have disabled ALL POSSIBLE validation in order to try and eliminate it as a culprit, so i dont understand how validation can be affecting the usercontrol.

View 1 Replies

Forms Data Controls :: Firing Postback From Repeater Row Click?

Jul 19, 2010

I have a repeater which contains a hidden link button that fires when I click a row in my repeater.

Here is the markup for my repeater:

<div id="divResults" style="height: 290px; overflow-y: auto;">
<asp:Label ID="lblNote" runat="server" Text="Note: select a row to edit."></asp:Label> [code]...

Here is the javascript thats added to each row in the rptLocations_ItemDataBound:

Row.Attributes.Add("onclick",
"javascript:__doPostBack('ctl00$mainContent$rptLocations$ctl0" + (e.Item.ItemIndex + 1).ToString() +
"$lbtn_SelectRow','')");

When I click the repeater row it fires the SetLocationControls method. As you can see my repeater is wrapped in a DIV of height 290px. When the are more than 9 rows in my repeater you have to scroll the div down to view this row. When I click this row it does the postback but doesn't fire the SetLocationControls method. I've had a look in the source it's created the click event to the repeater row like all the other rows. why this method isn't firing on the rows that aren't initially visible in my DIV?

View 21 Replies

Forms Data Controls :: OnRowCommand Not Firing If Gridview Not Bound On Postback?

Jun 22, 2010

I have a webpage with many updatepanels. Each panel contains databound controls including gridviews (GV). They are bound at runtime so the number of gridview columns varies with each bind. the controls are bound only once in Page_Load event ( within if (!Page.IsPostBack) )I added a linkbutton to each header in the GV in the RowDataBound event. Once the header is clicked, the event is handled in the OnRowCommand and it calls a method to bind the controls with new data.Things work fine if the GV is bound with every postback (no if (!Page.IsPostBack) condition) but I don't want to bind all the controls with every postbackMy problem is that the OnRowCommand is not fired if the GV is not bound on the postbackI even tried to add click handler for the linkbutton but that didn't work either.

View 4 Replies

AJAX :: Calling Webservices From Javascript: OnError Method, How To Identify The Method

Aug 26, 2010

I have an application that has JS calling ASMX files to do asyncronous requests, using ASP.NET AJAX.

The problem is that I use always the same "onError" function, and now I don't know how to identify the method that rised the error, and it is giving me a lot of problems to debug errors. The parameter "data" of the onError method does not give enough information, for
example:

en System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
en System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object& convertedObject)
en System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeMain(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object& convertedObject)
en System.Web.Script.Serialization.ObjectConverter.ConvertObjectToType(Object o, Type type, JavaScriptSerializer serializer)
en System.Web.Script.Services.WebServiceMethodData.StrongTypeParameters(IDictionary`2 rawParams)
en System.Web.Script.Services.WebServiceMethodData.CallMethodFromRawParams(Object target, IDictionary`2 parameters)
en System.Web.Script.Services.RestHandler.InvokeMethod(HttpContext context, WebServiceMethodData methodData, IDictionary`2 rawParams)
en System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext context, WebServiceMethodData methodData)

Is there any way to know the webmethod that raised the error?

View 1 Replies

AJAX :: How To Prevent Master Page Postback When Update Panel Asynchronous Postback Happened

Oct 15, 2010

When an asynchronous postback happened inside update panel, another postback happens also for MasterPagenot only update panel embedded page .I want to prevent this MasterPage postback . is this possible ?think like i have a MasterPage and another page which is test.aspx which is content page of MasterPagei have update panel at test.aspxwhen asynchronous postback happens at this test.aspx update panel it also loads
MasterPage Page_Loadi want to prevent this (it should not also load MasterPage Page_Load)

View 3 Replies

Web Forms :: Why The Method LoadViewState() Is Not Called After The Postback

Sep 7, 2010

I can't understand why the method LoadViewState() is not called after the postback in my code below.After label1 cahnges its text the "__VIEWSTATE" hidden field is modified, but LoadViewState() is not called.

[Code]....

View 3 Replies

AJAX :: Calling A Regular Method From Within A Web Method?

Nov 1, 2010

i have a web service that i use for the AutoCompleteExtender, let the below code show you what i'm trying to do: [Code]....

this method is called, and when it calls the method inside the Patients Class, it gets lost. does that mean that i can't use 3-tier approach with web methods?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved