Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all 5678 articles
Browse latest View live

AsyncFileUpload

$
0
0

Hi,

I am using an AJAX AsyncFileUpload control that works great.  The control is located inside an <asp:panel> that is displayed using a ModalPopupExtender.

The trouble I am having is in trying to close the ModalPopupExtender at the AsyncFileUpload event, OnClientUploadComplete.

I have researched every possible way I know to get javascript to .Hide() the ModalPopupExtender at the OnClientUploadComplete event, but nothing works.  In addition I have tried calling it from the code behind during the UploadedComplete event by using ModalPopupExtender.Hide().  However, this does not work either.

I would presume it is because the AsyncFileUpload control is inside a Panel which is called by a ModalPopupExtender?

Does anyone know how to do this?  I just want to automatically hide the ModalPopupExtender after the AsyncFileUpload is UploadedComplete.

Thanks.


_doPostback Not Working After Deploy

$
0
0

Hi All,

I have use linked graph in multiple place. using below approach.

<set value='9' link='javascript:RequestStatusupServiceDeskRequestsMonthWise(10)'/>
This approach used in different kinds of graph such as PieChart, MSLineChart, 3DBarChart etc.

then use below code in aspx page.
<script>
function RequestStatusupServiceDeskRequestsMonthWise(val) {
alert('hello');
__doPostBack('<%= upServiceDeskRequestsMonthWise.UniqueID %>', 'Request$' + val);
}
</script>
I'm using Literal asp control for generating graph.

This is working fine in localhost before publishing.
But when I publish on our development server then alert('hello') message is showing but not postback to server. 

implement updatepanel,scriptmanager, asyncpostbacktriggers in my asp.net 4.0 web appln

$
0
0

hi,

am not using ajacontroltoolkit.

but wanna  implement ajax- scriptmanager, updatepanel asyncpostbacktriggers  etc in my aspx pages.

1)           how to implement these?

2)            also wanna implment in a  usercontrol also.

instead of putting scriptmanager control in all the  aspx pages, is it ok, that i can insert this tag in the master page, once and it will be applied everywhere?

in that case (3), why its failing to implement it in a user control?

and

(4) when i implement javascript validation in my aspx page, it throws error when other team members uses redfieldvalidator for form validation in their aspx pages?  does that mean that javascript/jquery validation  doesnt go hand-in-hand with ajax implmentation?

(5) am having  simple form with few txtboxes, dropdown with a submit button-- how can i implement ajax in this form

any help is appreciated..

 

Sql StoredProcedure, Asp.net vb,

$
0
0

hi friends i have a table with column name(centercode,totalloaners,loanamount,principle,interest,loandate,collectionday)

in my table i have more than 500 center records, for that i want  stored procedure to procees overall collection

(ie) individual collection

    centerwisecollection and

    overallcollection

Ajax toolkit Autocomplete seems to be crashing on single quotes

$
0
0

Hello,

 

I am trying to use Ajax toolkit autocomplete on an aspx page. When I try to perform a search including a single Quote in the search string(Like for instance L'Oréal) nothing happens. A glimpse at the script debugger in IE shows the error code "SCRIPT1004: ';' expected" and the offenting lines of code seems to be this one generated from the toolkit:

<script type="text/javascript">
//<![CDATA[
(function() {var fn = function() {$get("ucSearch_ScriptManager1_HiddenField").value = '';Sys.Application.remove_init(fn);};Sys.Application.add_init(fn);})();Sys.Application.add_init(function() {
    $create(Sys.Extended.UI.AutoCompleteBehavior, {"completionInterval":2,"completionSetCount":20,"contextKey":"False@True@False@False@False","delimiterCharacters":"","enableCaching":false,"id":"Search_AutoComplete","minimumPrefixLength":2,"serviceMethod":"GetSimpleSearchAutoCompletion","servicePath":"SearchWS.asmx","useContextKey":true}, {"itemSelected":TextSelected}, null, $get("ucSearch_txtSearch"));
});
//]]></script>

This leads me to believe that single quotes are not handled correctly by the toolkit code. Has anyone else has this kind of problem and have you found a solution to the problem?

Twitter control doesn't work anymore?

$
0
0

As much as I understand, Twitter disabled the old API, and the Twitter control is still trying to use it. Just checked that with latest version (7) of control, and instead of tweets it is displaying "There are no matching tweets.".

Is there any plan to fix the issue?

JavaScript runtime error: Sys.InvalidOperationException: A control is already associated with the element in IE10

$
0
0

Hi All,

JavaScript runtime error: Sys.InvalidOperationException: A control is already associated with the element in IE10 but in other browsers (chorme and firefox) it is working fine

Please help me to resolve the issue.

Thanks in Advance.

Thank You,

Naga Varma

problem with ComboBox

$
0
0

<ajaxToolkit:ComboBox ID="drp_LastupdatedTime" runat="server" Width="40px" AutoPostBack="False"
DropDownStyle="DropDown" AutoCompleteMode="SuggestAppend" CaseSensitive="False"
ItemInsertLocation="OrdinalText">
<asp:ListItem Value="0">All</asp:ListItem>
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>3</asp:ListItem>
<asp:ListItem>6</asp:ListItem>
<asp:ListItem>12</asp:ListItem>
<asp:ListItem>24</asp:ListItem>
<asp:ListItem>48</asp:ListItem>
<asp:ListItem>>84</asp:ListItem>
<asp:ListItem>>96</asp:ListItem>
<asp:ListItem>>108</asp:ListItem>
<asp:ListItem>>120</asp:ListItem>
</ajaxToolkit:ComboBox>

its not working properly when page post back.

its looking like textbox and when we send to server its not refresh its value


Ajax:CalendarExtender ( Date Issue)

$
0
0

Hi,

I have used Ajax:CalendarExtender in my application and I am trying to validate it by using asp:CompareValidator for "dd/mm/yyyy" format it works fine with my local machine as it has "dd/mm/yyyy" format. But when we upload it on Server having "mm/dd/yyyy" format, My validation goes down.

For example .. I enter date as 21/06/2013 on my local machine it works fine .. BUT if I enter same date on server it shows error.

Following is my Code..

 <td>
                            <asp:TextBox runat="server" ID="txtAnniversary" CssClass="textbox" Style="width: 160px;"
                                MaxLength="10"> </asp:TextBox>
                            <asp:Image ID="imgAnniversary" runat="server" ImageUrl="~/Images/DatePicker.png"
                                Style="vertical-align: bottom;" />
                            <Ajax:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtAnniversary"
                                PopupButtonID="imgAnniversary" PopupPosition="BottomLeft" Format="dd/MM/yyyy">
                            </Ajax:CalendarExtender>
 </td>

<td>

                            <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="txtAnniversary"
                                Operator="DataTypeCheck" Type="Date" ValidationGroup="ValidateCustomer"
                                ErrorMessage="Please enter date in proper format(dd/mm/yy)" CssClass="failureNotification"
                                Display="Dynamic"></asp:CompareValidator>

</td>

Thanking You.

Runtime-error Microsoft JScript: ASP.NET Ajax client-side framework failed to load (IIS7.5)

$
0
0

Hi,

I have an ASP.NET website that uses a scriptmanager. The website works on my machine locally. It also works locally on our production server (windows server 2008 R2 with IIS7.5), but when I try to access the site from outside the network I get an error message: Runtime-error Microsoft JScript: ASP.NET Ajax client-side framework failed to load.

The website is build in visual studio 2010 with framework 4.0. Now this same website works correctly when I install it on a windows server 2003 with IIS6 and Ajax extensions. Also from outside the network.

I have really tried everything that's being suggested on the internet (I am reading and trying for almost a week), but unfortunately without success.

Is there something special that I have to install in order to make it work with IIS7.5?

Is there someone who had the same experience and found a solution?

Thanks!

HTMLEditor dynamic data web + change direction

$
0
0

I am using HTMLEditor in my dynamic data web project as one of myfields templates. I really disappointed to change thedefault direction to

right to left. How i can do this and change the direction. Please help me . it can not be done via css. I try every class that was produced in client website. Please help me

Can I specify a UserControl custom event as a Trigger for update panel on Parent page?

$
0
0

I have a parent page which hosts several user controls contained within an accordion on the parent page which are created dynamically. 

My Parent page is wrapped in an UpdatePanel and UserControls are also wrapped in UpdatePanels due to only needing partial postback on most of the user interaction with the control.

Lets say I have an event on each User Control that bubbles back to the parent page called "OnEnableLink". When this event is raised from the UserControl, I'd like to enable a LinkButton on the Control's Parent Page.  When the event is called the code on the parent page catches the event and enables the link [lnkExample.Enabled = true;] but the page isn't reflecting the change as the link button is still disabled.  My assumption is the reason is it's not updating due to the UpdatePanel.  I've tried calling ParentPageUpdatePanel.Update() within the event after i enable the link button and it results in an error that Update() can't be called outside of PreRender.  I'm assuming I need a trigger to update the Parent Page when it intercepts the event from the UserControl but since they are created dynamically I'm lost :-( 

Thanks in advance for any suggestions!

Sys.Extended.UI or Sus is undefined error

$
0
0

Hi Guys,


We have a got website in asp.net 4.0 , IIS 7, we get sys.extended.UI is null or not an object error.

I have made all possible changes in web.config and IIS 7 by changing from classic to integrated.


Can you please provide your valuable suggestions please, let me know if any details required.

Regards,

AP

ajax extension works in chrome and firefox but not IE

$
0
0

see code box for the extender in question. It seems really strange that a a MS product like ajax does not work with their own browser? Is there some kind of patch/override/etc like with CSS to account for browser differences

<ajax:calendarExtender ID="calExt" runat="server" TargetControlID="someDateBox" Format="MM/dd/yyyy" ></ajax:calendarExtender>



AsyncPostback Trigger within ListView Control - CheckBox (causing full postpack)

$
0
0

I have searched everywhere and can't find a solution to this.  I'm using Visual Studio 2012 (ASP.NET 4.5 Framework). I have a ListView control with an LayoutTemplate in which has a CheckBox control (this is repeated for each databound row).  I have an updatepanel outside the listview which has a label I was to update when the user checks/uncheckes any of the checkboxes in the listview control.  This is working, however no matter what I do, it does a full postback.

To reproduce. In VS2012 start a New ASP.NET Web Forms Application.   This has a Site.Master MasterPage and a few pages for a new asp.net project.  Edit the About.aspx and replace with the following page and code below.   What I have done in this example is made a Text Box control and button that shows that the partial postback is working.   I update the Label2 (which is not in an updatepanel) on post back.  If the trigger is working in the listview, label2's should not update until a full postback.

I have tried the following (as one suggestion) on the updatepanel label, and also on the page as whole (which doesn't seem to make a difference).:  

ClientIDMode="AutoID"

Here is the code to reproduce the problem.  

.aspx

<asp:Label ID="Label2" runat="server" Text="Label"></asp:Label><asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" /><asp:ListView ID="ListViewProducts" runat="server" ItemPlaceholderID="ProductItem" OnItemDataBound="ListViewProducts_ItemDataBound" ><ItemTemplate><div class="Product"><asp:CheckBox ID="CheckBox1" runat="server" OnCheckedChanged="CheckBox1_CheckedChanged" AutoPostBack="true" ClientIDMode="AutoID" /><strong><asp:Label runat="server" ID="LabelId" Text='<%# Eval("Id") %>'></asp:Label>
                    ::<asp:Label runat="server" ID="LabelName" Text='<%# Eval("Name") %>'></asp:Label></strong><br /><em><asp:Label runat="server" ID="LabelDescription" Text='<%# Eval("Description") %>'></asp:Label></em></div></ItemTemplate><LayoutTemplate><asp:PlaceHolder runat="server" ID="ProductItem"></asp:PlaceHolder></LayoutTemplate><ItemSeparatorTemplate><hr /></ItemSeparatorTemplate></asp:ListView><asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"><ContentTemplate>
            Update Panel:<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label></ContentTemplate><Triggers><asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" /></Triggers></asp:UpdatePanel>

code behind

 public class Product
    {
        private int? _Id;
        private string _Name;
        private string _Descrition;

        public Product() { }

        public Product(int Id, string Name, string Description)
        {
            this._Id = Id;
            this._Name = Name;
            this._Descrition = Description;
        }

        /// <span class="code-SummaryComment"><summary></span>
        /// Product Id
        /// <span class="code-SummaryComment"></summary></span>
        public int? Id
        {
            get { return _Id; }
            set { _Id = value; }
        }

        /// <span class="code-SummaryComment"><summary></span>
        /// Product Name
        /// <span class="code-SummaryComment"></summary></span>
        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }

        /// <span class="code-SummaryComment"><summary></span>
        /// Product Complete Description
        /// <span class="code-SummaryComment"></summary></span>
        public string Description
        {
            get { return _Descrition; }
            set { _Descrition = value; }
        }
    }

    public class ProductList
    {
        private IList<Product> _ProductDB = new List<Product>();

        public ProductList()
        {
            this._ProductDB.Add(new Product(1, "Computer", "Complete hardware with software included."));
            this._ProductDB.Add(new Product(2, "Kitchen Calendar", "Beautiful caledar for your kitchen."));
            this._ProductDB.Add(new Product(3, "Shoes", "Most advanced anti-impact system in a small shoe."));
            this._ProductDB.Add(new Product(4, "Pen", "What you think, must be written. This pen is your helper."));
            this._ProductDB.Add(new Product(5, "Cell Phone", "Powerfull comunication thing. Today is part of your body. Get one more."));
        }

        public IList<Product> GellAll()
        {
            return this._ProductDB;
        }
    } 

    public partial class About : Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ProductList db = new ProductList();
                this.ListViewProducts.DataSource = db.GellAll();
                this.ListViewProducts.DataBind();
            }

            Label2.Text = DateTime.Now.Ticks.ToString();
        }


        protected void Button1_Click(object sender, EventArgs e)
        {
            Label1.Text = TextBox1.Text;
        }

        protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
        {
            Label1.Text = DateTime.Now.Ticks.ToString();
            UpdatePanel1.Update();
        }



        protected void ListViewProducts_ItemDataBound(object sender, ListViewItemEventArgs e)
        {
            CheckBox cb = e.Item.FindControl("CheckBox1") as CheckBox;
            ScriptManager.GetCurrent(Page).RegisterAsyncPostBackControl(cb);   
        }

    }




set ajax.gif

$
0
0

Hi,

I use ScriptManager and UpdatePanel, 

I want set ajax.gif to this, and i want load ajax.gif in center of screen,

please help me,

Problems setting focus on a control in an AJAX toolkit TabContainer / TabPanel as part of a master page

$
0
0

Hopefully someone can quickly help with this one, I have spent many hours on other articles and approaches and beleive it is able to be solved using the - AjaxControlToolkit.Utility.SetFocusOnLoad method, however I am having troubles correctly referencing the FindControl, below is the code

As this page is also using a Master page, I 'm not sure how to get around accessing the HTML <body> OnLoad for a client side solution, but would prefer a server side solution if there is one.

OnLoad

' try to force focus to a control which is itself, within an AJAX tab'
        If Not (IsNothing(Session("ControlIDforFocus"))) Then
            Try

                Session("Temp") = ""
                AjaxControlToolkit.Utility.SetFocusOnLoad(FindControl("ContentMain").FindControl(Session("ControlIDforFocus")))
                Session("Temp") = "AJAX SetFocusOnLoad worked"

            Catch ex As Exception
               Session("Temp") = "AJAX default focus failed"
            End Try

            ' track which path the try logic takes'
            TempDebugLabel2.Text = Session("Temp")

        End If

**  I now know the above code is wrong, see my later reply / correction explaining how I implimented FindControl

The Page markup

<asp:Content ID="ContentMain" ContentPlaceHolderID="MainContent" runat="server">
<asp:TabContainer ID="TestCentreTabContainer" runat="server" Width="100%" 
ActiveTabIndex="3">
<asp:TabPanel runat="server" ID="DoTestTabPanel">

         ... other layers of markup tags being DIVs and other Panels etc

         <asp:Panel ID="DoTestTab_StartTestPanel" runat="server">
              ..... this panels  content, which is not needing to be referenced at all</asp:Panel><asp:Panel ID="DoTestTab_TakeTestPanel" runat="server">

                    ... other layers of markup tags being DIVs etc

                    *** I need to be able to reference / setfocus to the below control during a postback ***<asp:TextBox ID="DoTestTab_QuestionAnswerEnteredTextBox" runat="server" Width='50px'></asp:TextBox><br /></asp:Panel></asp:TabPanel>
</asp:TabContainer>
</asp:Content>     

AJAX Editor Control ValidationGroup

$
0
0

How can I set a ValidationGroup for an Editor Control?

 

Thanks

the htmleditor - how do I set a max-length, and how do I edit source?

$
0
0

 I am using the htmleditor control, and I want to set a maximum length on the contents.  Is that possible?

 Also, I want to be able to edit the source html of the contents - that is, if I have to put in an IMG tag, I want to be able to do that.  It seems that you can't, you have to paste pictures of images into the content.  If I have to, I could write an asp.net page that displays all images stored on my website, and lets them be copied/pasted into the editor control, but that seems excessive.  

Thanks.

Script error with Visual studio 2012

$
0
0

Unhandled exception at line 1, column 81688 in http://localhost:51651/bundles/MsAjaxJs?v=J4joXQqg80Lks57qbGfUAfRLic3bXKGafmR6wE4CFtc1

0x800a139e - Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.

Details: Error parsing near 'Object reference not'.

Viewing all 5678 articles
Browse latest View live




Latest Images