.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

Problems with AJAX slider and autopostback=true ?

Posted By:      Posted Date: September 27, 2010    Points: 0   Category :ASP.Net
 

I have three AJAX sliders and each has a:

<asp:AsyncPostBackTrigger ControlID="Slider1" EventName="TextChanged" />
<asp:AsyncPostBackTrigger ControlID="Slider2" EventName="TextChanged" />
<asp:AsyncPostBackTrigger ControlID="Slider3" EventName="TextChanged" />


When I do a TextChanged event on slider1 (by dragging the slider, changing the value), the protected void Slider1_TextChanged(object sender, EventArgs e) event FIRES,  however, the TWO other sliders, protected void Slider2_TextChange, and protected void Slider3_TextChange  also FIRES.  What gives?  why do they fire when I am physically only sliding the slider1 across.  The two other sliders values did not change on the webform, yet the event fired.


In order for the event to fire for slider1, I had to insert "Autopostback=true" in the <asp:TextBox ID="Slider1" autopostback="true" OnTextChanged="Slider1_TextChanged">.  For <asp:TextBox2> and <asp:Textbox3> I did not put the autopostback event for now.


thanks!!!




View Complete Post


More Related Resource Links

Asp AJax ModalPopup Problems

  
HI, I am invoking a modal formview popup for edit and insert on a gridview selection. When the edit button is first clicked, the popup shows up and on subsequent click it gives errors like    Microsoft JScript Error:Sys.InvalidOperationException:Two Components with the same id.    ctl100_ContentPlaceHolder1_ucopsphone11_mdlPopupPhone cannot be added to the application. The ucopsphone11 is a grid user control within which I placed a modal formview. 1. How to make the modal popup work properly. 2. The update/cancel/command should be inside the popup formview or outside of the modal popup. 3. In the modalPopup usercontrol page_load event I was trying to set default mode. But it fires only once because     of (Not PostBack) during the page load. But when modalPopup is shown it is not fired.      I want to the use same modalPopup for edits/insert.   I have been struggling with this for more than a day. I would appreciate if someone help me move forward with this. Thanks Suresh   Grid View Page protected void GridViewAppPhone_SelectedIndexChanged(object sender, EventArgs e) { GridViewRow row = GridViewAppPhone.SelectedRow; int index = GridViewAppPhone.SelectedIndex; strkey1 = GridViewAppPhone.DataKeys[rows.RowIndex["id"].ToString() Session["papp_id"] = strkey

How do I label my AJAX Slider Extender?

  
I'm using a slider extender to allow user to select a value from 1 to 7.  It works perfectly, but I can't figure out for the life of me how to label the damn thing.  I would like the slider to look something like these lovely examples from RadControls: http://demos.telerik.com/aspnet-ajax/slider/examples/default/defaultcs.aspxHere is the code for my slider:  <table align="center">         <tr>             <td>1.  This client is very important to my firm's office</td>             <td>                 <asp:TextBox ID="M1_Slide" runat="server"></asp:TextBox>             </td>             <td>                     <asp:TextBox ID="M1_Bound" runat="server" Width="30"></asp:TextBox>                 <asp:SliderExtender ID="TextBox1_SliderExtender"                      runat="server"               &nbs

AJAX Slider Question

  
I realized I incorrectly posted my code when I originally posted this query so I will try again.  I am trying to use a Slider Extender with the values 1.00 to 7.00.  The Slider works properly but I would like to add labels to the slider with the values 1 thru 7.  Any guidance would be greatly appreciated!<asp:TextBox ID="M5_slide" runat="server"></asp:TextBox> <asp:TextBox ID="M5_Bound" runat="server" Width="30"></asp:TextBox> <asp:SliderExtender ID="M5_SliderExtender" runat="server" Enabled="True" EnableHandleAnimation="true" Decimals="2" Maximum="7" Minimum="1" Orientation="Horizontal" TargetControlID="M5_Slide" BoundControlID="M5_Bound"> </asp:SliderExtender>

Dropdownlist not firing SelectedIndexChanged on first item with autopostback true

  
Hi: Has anyone ever found a work around for the well documented and well known bug, the dropdownlist bug? Specifically where the SelectedIndexChange event does not fire on the first listitem, althought both autopostback and enableviewstate are true? In other words, if the first three items in the dropdownlist are red, blue, green, if you select green, the SelectedIndexChanged will fire, but if you then select red, the first item in the ddl, the event will not fire. All listitems will fire the SelectedIndexChanged event, except for the very first listitem. The HACK has always been to include a dummy item as the first list time like"Select a Color" to get around the first item bug. I have got a situation where I cannot use that hack. Ideas?  TIA, Bill  

Gridview, MasterPage, Ajax, AutoPostback and FRUSTRATION

  
I have a peice of code for a custom Gridview that works great if it is not in my Master.Page. As soon as I put it in my masterpage /ajax update panel it seems the autopostback function of my checkbox stops working.... please advice. Here is the relevent code :   NOTE: (I have tried to turn on ViewState in every thing I could think of.....still nothing) <asp:GridView ID="gvHR" CssClass="gridview" runat="server" AllowPaging="True" EnableViewState="true" DataKeyNames="HRID" AutoGenerateColumns="False" DataSourceID="ldsHR"> <Columns> <asp:BoundField DataField="FirstName" HeaderText="FirstName" ReadOnly="True" SortExpression="FirstName" /> <asp:BoundField DataField="LastName" HeaderText="LastName" ReadOnly="True" SortExpression="LastName" /> <asp:BoundField DataField="EmailName" HeaderText="EmailName" ReadOnly="True" SortExpression="EmailName" /> <asp:TemplateField HeaderText="LeftCompany" SortExpression="LeftCompany&quo

Weird behaviour of Gridview with textbox with autopostback OnTextChanged and AJAX CalendarExtender

  
I ran in to some strange behaviour of Gridview with textbox with autopostback OnTextChanged and AJAX CalendarExtender. This gridview is in an updatepanel with scriptmanager. When my gridview is filled with data, it keeps running my OnTextChanged  function and therefor makes my application terribly slow. I need to have the autopostback and ontextchanged function to recalculate stuff in my gridview. Does anybody know of this problem and if so does anybody found a workarround ?

Problems installing the Ajax Toolkit

  

Hi All

Problems installing Ajax toolkit in MS Visual Studio 2005 Framework 2.050727 SP2

 Followed the instructions on this Site:

http://programming.top54u.com/post/How-to-install-AJAX-Control-Toolkit.aspx

 

Was able to build the TemplateVSI in the solution without any problems but the problem I always encounter is the part where I build the SampleWebsite in the solution explorer.

 

The build fails with 105 errors

e.g.

 Error    1          The type or namespace name 'Script' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)    C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\AjaxControlToolkit\ExtenderBase\ExtenderControlBase.cs    16         18         AjaxControlToolkit

etc


Getting the headertext of a selected column when autopostback = true

  

Hi All,

I have a grid which is getting bound from a dataset and the autogeneratecolumns prperty is set to true.

Now i have a menu control. And when i select a particular cell, I want to headertext of the cell selected should appear as the text of the menu item.

But because autogeneratecolumns = true, so i gridview.columns.count=0. So not able to get the header text.

The code goes as follows.

If selectedColumnIndex > 4 Then
                menuBSDet.Items(0).ChildItems(menuDetail.RemoveDetValues).Enabled = True
                menuBSDet.Items(0).ChildItems(menuDetail.RemoveDetValues).Text = "Remove " & gvwBSDetails.Columns(selectedColumnIndex).HeaderText
            Else...


 

Can somebody please help?


Ajax AutoComplete is not working when Cookieless is true

  

Hi All,


I have a web page that using AutoComplete Asp.net Ajax Control.

It was working find when the Cookieless is not "True".


I have no idea my it is not working when I set cookieless to "true".


Thanks,

Thirith.





asp.net 4.0 MVC 2 ajax problems

  

Hi together,

I'm just testing asp.net 4.0 with MVC 2. I've tried some test-applications (musicstore for example) for checking out ajax functionality. Unfortunately all calls like <%: ajax.ActionLink(....) %> are not executed as ajax-calls when hosting the application on IIS 7. They are allways handled the same way as an html.ActionLink() call.
Starting the Application with VS Studio 2010 internal Host, all works fine.

It seams to be a configuration problem, but I dont know where to look for.

Dose anybody have an idea?

Thanks Joe


Cascading dropdown not posting back even though autopostback=true?

  

I have the following code:

.aspx
<asp:DropDownList ID="ddlCountries" AutoPostBack="true" runat="server">
</asp:DropDownList>
<cc1:cascadingdropdown ID="cddCountries" runat="server" Category="Country" Enabled="True" LoadingText="loading" PromptText="choose country"
    ServiceMethod="GetCountries" ServicePath="geolocation.asmx" TargetControlID="ddlCountries">
</cc1:cascadingdropdown>


code behind
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    ShowSearchResults()
End Sub

Private Sub ShowSearchResults()

End Sub


Why is the ShowSearchResults method not called when I change a value in the ddlCountries dropdown, even though I have autopostback="true" on it.


Required Validator disappears after autopostback set to true of a dropdownlist

  

My dropdownlist having data from database added with the following item:

DropDownList.Items.Insert(0, new ListItem("Please select", "0"));

My dropdownlist is inside of updatepanel. The autopostback=true is required.

The code is like following:

<asp:DropDownList ID="DropDownList" AppendDataBoundItems="True" runat="server"
                  DataTextField="Description" DataValueField="CommonCodeId" TabIndex="4" 
                    CssClass="drop_red_style1" AutoPostBack="True" CausesValidation="True" 
                     OnSelectedIndexChanged="DropDownList_SelectedIndexChanged">
                </asp:DropDownList>

<asp:RequiredFieldValidator ID="RequiredFieldValidator" runat="server" ControlToValidate="DropDownList"
                    Display="Dynamic" InitialValue="0" SetFocusOnError="true" ValidationGroup="Registration">Required</asp:RequiredFieldValidator>
Please guide me how to keep the required field validator message.


Required Validator disappears after autopostback set to true of a dropdownlist

  

My dropdownlist having data from database added with the following item:

 

DropDownList.Items.Insert(0, new ListItem("Please select", "0"));

 

My dropdownlist is inside of updatepanel. The autopostback=true is required.

The code is like following:

<asp:DropDownList ID="DropDownList" AppendDataBoundItems="True" runat="server"
DataTextField="Description" DataValueField="CommonCodeId" TabIndex="4"
CssClass="drop_red_style1" AutoPostBack="True" CausesValidation="True"
OnSelectedIndexChanged="DropDownList_SelectedIndexChanged">
</asp:DropDownList>

<asp:RequiredFieldValidator ID="RequiredFieldValidator" runat="server" ControlToValidate="DropDownList"
Display="Dynamic" InitialValue="0" SetFocusOnError="true" ValidationGroup="Registration">Required</asp:RequiredFieldValidator>
Please guide me how to keep the required fie

ASP.Net Chart control + AJAX slider integration

  

Hi All, I am investigating on a way to implement a chart control with a slider on its x-axis

Scenario:

1) Chart which displays the values in a bar graph format (not particular about the format here)

2) a slider should be provided in the x-axis

3) when a user adjusts the slider on the x-axis, the chart display should vary accordingly

Is this possible

Can someone help me with this

Thanks

Carol


AJAX Validatorcallout control problems

  

Hiii Everyone i have been trying to use the AJAX Validatorcallout control to my asp project...but it gives some error that it cannot be used with asp textboxes...any way to use it...


My jQuery slider disappears after any ajax callback

  

My jQuery slider disappears after any ajax callback.  I had a similar situation before and resolved it, but this scenario is different (and javascript is my weakest link).

I have a jQuery slider on my page inside an asp panel.  I'm rounding the panel corners with a RoundedCornersExtender.  That rounded panel is inside an asp UpdatePanel. 

Whenever any callback occurs, my slider disappears.  It disappears from sight, and all the controls below the slider move up about 12 pixels (approximately the height of the slider).  If I move the slider outside the UpdatePanel, it works as expected.

But I can't move the slider outside the UpdatePanel because it is in the flow with other controls that need to be ajax-ified.

I suppose I can have the slider logically outside the UpdatePanel yet place it with 'position:', but that seems like a poor design. 

Here is the javascript for the slider:

<script type="text/javascript">

    $(function () {

        $("#slider-range").slider({

            range: true,

            min: 1,

         &nb

Dropdownlist AutoPostBack="true" NOT Firing in IPhone

  

Hi everyone,

This is really weird...I have a ASP.NET page for mobile view.

On that page I have this part:

<td><asp:DropDownList ID="DropDownLocation" runat="server" AutoPostBack="true" OnSelectedIndexChanged="test" 
                            appenddatabounditems="True" style=" font-size:large; vertical-align:middle;" Width="170px">
                    <asp:ListItem value="Houston">Houston</asp:ListItem>
                    <asp:ListItem value="El Paso">El Paso</asp:ListItem>
                    <asp:ListItem value="Austin">Austin</asp:ListItem>
                    <asp:ListItem value="Boise">Boise</asp:ListItem>
                    <asp:ListItem value="Washington">Washington</asp:ListItem>
            </asp:DropDownList>

While testing this on normal computer using IE7 IE8 it fires the AutoPostBack Control.

BUT TESTING IN IPHONE THIS DOES NOT FIRES....

ALSO THE DISPLAY IS WIERD BECAUSE A SEPARATE BOX APPEARS AT THE BOTTOM TO SELECT THE LIST.

What am I doing wrong?

Thank you in advance!

 

 


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend