Are you the publisher? Claim or contact us about this channel

Embed this content in your HTML


Report adult content:

click to rate:

Account: (login)

More Channels

Channel Catalog

Channel Description:

ASP.NET Ajax and the Ajax Control Toolkit including the Accordion, Calendar, Modal Popup, and more

older | 1 | .... | 113 | 114 | 115 | (Page 116) | 117 | 118 | 119 | .... | 220 | newer

    0 0

    I just updated the Ajax toolkit for to, and now my tab containers do not render.

    I get this errror   - Uncaught TypeError: Cannot read property 'UI' of undefined

    Using chrome debugger, I found the error occurred in this line - $create(Sys.Extended.UI.TabPanel,{"headerTab":$get("__tab_ctl00_ContentPlaceHolder1_TabContainer2_p2"),"ownerID":"ctl00_ContentPlaceHolder1_TabContainer2","wasLoadedOnce":false},null,{"owner":"ctl00_ContentPlaceHolder1_TabContainer2"},$get("ctl00_ContentPlaceHolder1_TabContainer2_p2"));

    Can anyone help ?

    0 0


    I've got an Ajax AutoCompleteExtender that I seem to be having trouble with. I followed a basic implementation tutorial.. .. and I was able to populate the static string data from the code behind. I know the function is working properly. I just cannot seem to call the data from a database correctly.

    I've got sqlDataSource controls on the same page I work with and they work to populate GridView controls. I just cannot seem to query my SQL compact database from the code behind. The syntax seems to be correct, according to intellisence but it simply does nothing when I start typing a search in target control.

    Any Suggestions?

    The control is registered in the Web.config file for all pages.

    ASP for ToolkitScriptManager:

    <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></ajaxToolkit:ToolkitScriptManager>

    ASP for AutoCompleteExtender:

    <asp:TextBox ID="ClientSearch" runat="Server" Width="227px"></asp:TextBox><ajaxToolkit:AutoCompleteExtender
            UseContextKey="True"></ajaxToolkit:AutoCompleteExtender><asp:Button ID="SearchSubmit" runat="Server" Text="Search" />

    Below is were I'm stuck..I cannot seem to find a good method here to call the data from my SQL compact database...I do have a ConnectionString on the Web.config and I am able to get that same data with an SQLdatasource control..I just cannot get it with any of the code-behind methods I have tried from any tutorial..

    Here is the page Code Behind (C#)

    using System.Data;
    using System.Data.SqlClient;
    using System.Collections.Generic;
    using System.Configuration;
    using System;
    public partial class _Default : System.Web.UI.Page
        protected void Page_Load(object sender, EventArgs e)
        public static List<string> GetCompletionList(string prefixText)
            SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ToString());
            SqlCommand cmd = new SqlCommand("select * from Current where Name like @Name+'%'", con);
            cmd.Parameters.AddWithValue("@Name", prefixText);
            SqlDataAdapter da = new SqlDataAdapter(cmd);
            DataTable dt = new DataTable();
            List<string> Names = new List<string>();
            for (int i = 0; i < dt.Rows.Count; i++)
            return Names;

    Here is are my Connection Strings in the Web.config

    <connectionStrings><add name="ConnectionString" connectionString="Data Source=|DataDirectory|\Clients.sdf" providerName="System.Data.SqlServerCe.4.0" /><add name="ClientsEntities" connectionString="metadata=res://*/App_Code.Model.csdl|res://*/App_Code.Model.ssdl|res://*/App_Code.Model.msl;provider=System.Data.SqlServerCe.4.0;provider connection string=&quot;data source=|DataDirectory|\Clients.sdf&quot;" providerName="System.Data.EntityClient" /></connectionStrings>

    What am I doing wrong? I'm open to criticism. I'm a roast, baste me..

    0 0


    I have two date fields one is for date From and another on is for Date to. All I want to show date in from field as Today's date and in To field it should display date after one month from today.  

    Date from field I have used : 

    txt_to.Text = DateTime.Now.Date.AddDays(0)

    But for Date To Field I have no idea.

    Please help.

    0 0

    Not sure what I have done wrong, but when I add the file upload control I don't get the drag/drop box, only a select file button and then when I go to select files I can only select 1 at a time. (No Shift/Ctrl) support.  Thoughts. My code is as basic as it gets.

    Version: & Runtime: v4.0.30319 installed in VS2010 via NuGet.

    <ajaxToolkit:AjaxFileUpload ID="AjaxFileUpload1" OnUploadComplete="AjaxFileUpload1_UploadComplete" runat="server" /><ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></ajaxToolkit:ToolkitScriptManager>
            protected void AjaxFileUpload1_UploadComplete(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)
                Label1.Text = e.FileSize.ToString();
                AjaxFileUpload1.SaveAs(MapPath("~/Uploads/"+  e.FileName));



    0 0

    <asp:TextBox ID="txtPassword" runat="server" TextMode="Password"></asp:TextBox><asp:PasswordStrength ID="txtPassword_PasswordStrength" runat="server"
                    Enabled="True" TargetControlID="txtPassword" MinimumLowerCaseCharacters="1" MinimumNumericCharacters="1"
                    MinimumUpperCaseCharacters="1" RequiresUpperAndLowerCaseCharacters="true" CalculationWeightings="25;25;25;25"></asp:PasswordStrength>

    I want passwords that have upper and lower, and numbers, special characters are nice, but not needed.

    I am not sure why this says a password is 'strong' when it does not include the characters that I indicated.

    0 0


    I've just donwloaded Ajax Control Toolkit 4.0 which came with a zip file AjaxControlToolkitSampleSite. After unzipping it, I can see I do not have the Microsoft Visual Studio solution to open. Could anyone help me please letting me know how I can create or open the solution to play with all the controls that come with AjaxControlToolkitSampleSite?



    0 0

    I'm facing the following scenario (only with IE8):

    In JavaScript I'm changing the height of an IFRAME child element that's being controlled by a Collapsible Panel from 0 to the actual height as soon as it's being initially loaded.

    My code works flawlessly until above Collapsible Panel control itself is being placed into another Collapsible Panel control on the ASPX page. The outer Collapsible Panel then doesn't adhere to the new height (= the sum of the heights of all descendant Collapsible Panel controls, incl. content) I've set the IFRAME child element to using JavaScript. So, no matter if I open or close the child Collapsible Panel, the IFRAME's content is never visible.

    How can I have all parent Collapsible Panel controls recalculate their height according to current content in JavaScript?

    This is what the HTML tree looks like:

    + Collapsible Panel #1
    |-----+ Collapsible Panel #2
    |       |
    |       \----- Some DIV content
    \-----+ Collapsible Panel #3
            \----- My IFRAME content

    In this example, the height of Collapsible Panel #1 doesn't get recalculated after I've changed the height of my IFRAME content using JavaScript.

    0 0

    I created a web project in Visual Studio 2010 .Net Framework 4.0.  I needed to change the Framework to 3.5, so I changed it but I am getting error on Ajax tagsL

    "Unknown server tag 'ajaxToolKit: ToolkitScriptManager"

    How do I fix this problemn?

    0 0

    Hello.I havea web application that hasajaxcomponents,theserestrictmultiple characters. But when in the browsersecurityoption"Automation- activescriting"is disabled,theajaxcomponetesnot work.HowI cancheck ifthe user's browserhasenabledthe execution ofscripts(iejavascript)?
    Thank you very much.

    0 0

    i have a tab conatiner with 5 tabs each having gridview populated with data
    if a control is visible true on page load

    on post back ie a button click the tabs are made enabled true/false depending on the record count for the grid
    if count is 0 the tab will be disabled (but gets visible=false)

    i have javascript also using the tabindex
    when i click another button
    i get errro

    Failed to load viewstate.  The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request.  For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.

    how do i rectify it
    or is there ay way by which the tabs can be made enabled=false not visible= false

    0 0

    I can still able to delete my data though, but unfortunately I was unable to update and retrieve error messages if empty field is submitted on my search box.

    Any idea how do I resolve this error?

    Here's my code for it

    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager><asp:UpdatePanel ID="UpdatePanel1" runat="server">><ContentTemplate><asp:Label ID="lblOrderError" runat="server" ForeColor="Red"></asp:Label></p><label>Search:</label><input class="adminStylized" type="text" name="searchRecord" ID="txtSearchOrder" runat="server" placeholder="Order number" /><button ID="btnSearchOrder" runat="server" onServerClick="SearchOrder">Search</button><br /><br /><hr /><asp:GridView ID="grdOrder" runat="server" AutoGenerateColumns="False"
                            DataKeyNames="orderID" onrowcancelingedit="grdOrder_RowCancelingEdit"
                            onrowediting="grdOrder_RowEditing" onrowupdating="grdOrder_RowUpdating"
                            onrowdeleting="grdOrder_RowDeleting"><Columns><asp:BoundField DataField="orderID" HeaderText="Order ID"
                                    SortExpression="orderID" ReadOnly="true"/><asp:BoundField DataField="username" HeaderText="Username"
                                    SortExpression="username" ReadOnly="true"/><asp:TemplateField HeaderText="Game Title" SortExpression="title"><EditItemTemplate><asp:DropDownList ID="ddlOrderTitle" runat="server"
                                            DataSourceID="SqlDataSource1" DataTextField="title" DataValueField="title" SelectedValue='<%# Eval("title") %>'></asp:DropDownList><asp:SqlDataSource ID="SqlDataSource1" runat="server"
                                            ConnectionString="<%$ ConnectionStrings:GameConnectionString %>"
                                            SelectCommand="SELECT [title] FROM [games]"></asp:SqlDataSource></EditItemTemplate><ItemTemplate><asp:Label ID="lblOrderTitle" runat="server" Text='<%# Bind("title") %>'></asp:Label></ItemTemplate></asp:TemplateField><asp:TemplateField HeaderText="Quantity" SortExpression="quantity"><EditItemTemplate><asp:TextBox ID="txtOrderQuantity" runat="server" Text='<%# Bind("quantity") %>'></asp:TextBox></EditItemTemplate><ItemTemplate><asp:Label ID="lblOrderQuantity" runat="server" Text='<%# Bind("quantity") %>'></asp:Label></ItemTemplate></asp:TemplateField><asp:CommandField ShowEditButton="True" /><asp:TemplateField ShowHeader="False"><ItemTemplate><asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False"
                                            CommandName="Delete" Text="Delete" OnClientClick="javascript : return confirm('Confirm delete this order record?');"></asp:LinkButton></ItemTemplate></asp:TemplateField></Columns></asp:GridView></ContentTemplate></asp:UpdatePanel>

    0 0

    hi ,

    I am getting error while subtracting values in three text boxes and displaying it on label.


    Exception Details: System.FormatException: Input string was not in a correct format.
    Line 89:     Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Line 90:         Dim a As Integer
    Line 91:         a = (Convert.ToInt32(TextBox1.Text) - Convert.ToInt32(TextBox2.Text)) - Convert.ToInt32(TextBox3.Text)
    Line 92:          Label4.Text = a.ToString()
    Line 93:     End Sub

    The Code:

      Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
            Dim a As Integer
            a = (Convert.ToInt32(TextBox1.Text) - Convert.ToInt32(TextBox2.Text)) - Convert.ToInt32(TextBox3.Text)  Label4.Text = a.ToString()
        End Sub

    0 0

    I need to validate ajax cascading dropdown lists. See code below. It does not work. Could anyone help on it. I use VS 2008. Thanks


    <asp:DropDownListID="ddlTest" runat="server"Width="131px"></asp:DropDownList>



    ControlToValidate="ddlTest"ErrorMessage="This field is Required"InitialValue="-1"ValidationGroup="Submit">*</asp:RequiredFieldValidator>



                       LoadingText="Loading.."PromptText="-- Select --"  ServiceMethod="GetTestData"



    0 0
  • 07/12/13--15:57: Ajax Control toolkits
  • I just inslal Ajax Control toolkit but my problem is all the control are grey I mean disbale I did all I could to get them enable but without success. Can someone help me please. I am using windows 8 and Visual Studio 2012.

    Thhanks for you help.


    0 0

    I have a custom check box around which I want to place an update panel (AJAX) to avoid posting back the entire page.

    I get this error:

    Parser Error Message: Type 'System.Web.UI.UpdatePanel' does not have a public property named 'SmartCheckBox'.

    Thanks for any ideas!

    <tr><td style="height: 34px"></td><td style="height: 34px"><asp:UpdatePanel ID="UpdatePanel1" runat="server"><cc1:SmartCheckBox ID="cbWindows" class="FormTextBox" runat="server" Text="Windows VM Server(s)" AttributeKeyID="1340" AutoPostBack="True"/><cc1:SmartTextBox ID="SmartTextBox1" runat="server" AttributeKeyID="1341" Width="220px"></cc1:SmartTextBox></asp:UpdatePanel></td></tr><asp:Panel ID="Panel5" runat="server"><tr><td class="FormLabelB" style="height: 80px; width: 200px;"></td><td style="height: 80px; padding-left: 50px;" width="200px"><cc1:SmartCheckBoxList ID="cblWindows" runat="server"
                    class="FormTextBox" RepeatColumns="1" AttributeKeyID="1649" TextAlign="Left" Width="300px"><asp:ListItem>CPU Cores x Memory 1x3     </asp:ListItem><asp:ListItem>CPU Cores x Memory 2x8     </asp:ListItem><asp:ListItem>CPU Cores x Memory 4x16</asp:ListItem></cc1:SmartCheckBoxList></td></tr>

    0 0
  • 07/30/13--23:36: Update button doesnt work
  • I have a modal popup on a Master page. The popup opens correctly and it allows you to pick a file,but theupdate button acts like it is disabled.

    It has  an on click method tied to it and when you hover over it you get the hand cursor, but it doesnt seem to know that it is being clicked.  The Cancel button works as it should. Any one have any ideas?


    <%@ Master Language="C#" AutoEventWireup="true" CodeFile="profile.master.cs" Inherits="Profile_profile" %><!DOCTYPE html><html xmlns=""><head runat="server"><title></title><asp:ContentPlaceHolder id="head" runat="server"><link href="../Content/Site.css" rel="stylesheet" /></asp:ContentPlaceHolder></head><body><form id="form1" runat="server"><ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></ajaxToolkit:ToolkitScriptManager><div><div class="mypages"><div class="float-left" style="vertical-align:bottom"><asp:Image ID="iprofile" runat="server" CssClass="imgcenter" Width="100px" BorderStyle="Solid" BorderColor="Gold" BorderWidth="1px"  /></div><div class="float-left"  style="vertical-align:bottom; margin-left:100px; margin-top:25px; padding-left:15px;"><asp:Label ID="lname" runat="server"  /></div><div class="float-left"  style="vertical-align:bottom; margin-left:100px; margin-top:25px; padding-left:15px;"></div><div class="float-right"><asp:HyperLink ID="HyperLink1" runat="server" ImageUrl="~/Images/Site/logonobkgnd.png" BorderColor="indigo" BorderStyle="Solid" BorderWidth="15px" ImageAlign="Middle" NavigateUrl="~/Default.aspx" /></div></div><div><asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server"></asp:ContentPlaceHolder></div></div><div><asp:Label ID="lStatus" runat="server"></asp:Label></div><div><asp:Panel ID="Panel1" runat="server" CssClass="modalPanel"><asp:FileUpload ID="FileUpload1" runat="server" /><br /><div><asp:Button ID="picupload" runat="server" Text="Upload" OnClick="picupload_Click" /><asp:Button ID="piccancel" runat="server" Text="Cancel" /></div><asp:Label ID="lupload" runat="server" /></asp:Panel><ajaxToolkit:ModalPopupExtender ID="Panel1_ModalPopupExtender" runat="server"
                    TargetControlID="iprofile" PopupControlID="Panel1" CancelControlID="piccancel"
                    BackgroundCssClass="modalBackground" /></div>&nbsp;</form></body></html>

    the script

     protected void picupload_Click(object sender, EventArgs e)
            rider rd = new rider();
            string[] profilepic = new string[3];
            //HttpCookie cookie = Request.Cookies["RID"];
            //int rid = Convert.ToInt32(cookie.Value);
            int rid = Convert.ToInt32(Session["RID"]);
            profilepic = rd.getriderpic(rid, 100);
            iprofile.ImageUrl = "~/Images/Riders/" + profilepic[0];
            iprofile.Height = Convert.ToInt32(profilepic[1]);
            iprofile.Width = Convert.ToInt32(profilepic[2]);

    0 0


    I have successfully got a solution to disable future dates using javascript but how do i disable the past 7 days from todays date.

    <script type="text/javascript">
    function call(sender, args) {
    if (sender._selectedDate > new Date()) {
    alert("You cannot select a day greater than today");
    sender._selectedDate = new Date();
    // set the date back to the current date

    <asp:TextBox ID="txtdate" runat="server"></asp:TextBox>

    <ajax:CalendarExtender ID="txtdate_CalendarExtender" runat="server"
    Enabled="True" TargetControlID="txtVisitDate" OnClientDateSelectionChanged="call">

    0 0

    I am trying to apply a calendar extender to a textbox that I have on my form.  My code looks like this:

    <asp:TextBox ID="txtstart" runat="server" ></asp:TextBox>
                <ajaxToolkit:CalendarExtender ID="extendertest" runat="server" TargetControlID="txtstart"></ajaxToolkit:CalendarExtender>

    It compiles but when I hit run, this is what happens:

    0x800a138f - JavaScript runtime error: Unable to get property 'UI' of undefined or null reference


    0 0

    After I updated my project to the latest version of the tookit (AjaxControlToolkit.7.0725) I am getting this error. I used nuget and it did not update the sanitizer along with the toolkit.

    Configuration Error

    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

    Parser Error Message: Could not load file or assembly 'AjaxControlToolkit, Version=, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

    Source Error:

    Line 27: <sanitizer defaultProvider="HtmlAgilityPackSanitizerProvider">
    Line 28: <providers>
    Line 29: <add name="HtmlAgilityPackSanitizerProvider" type="AjaxControlToolkit.Sanitizer.HtmlAgilityPackSanitizerProvider" />
    Line 30: </providers>
    Line 31: </sanitizer>

    Source File: D:\WebDev\RspWeb\RspWeb\web.config Line: 29

    Here is the config file:

    <?xml version="1.0" encoding="utf-8"?>
    For more information on how to configure your ASP.NET application, please visit
    <sectionGroup name="system.web">
    <section name="sanitizer" requirePermission="false" type="AjaxControlToolkit.Sanitizer.ProviderSanitizerSection, AjaxControlToolkit" />
    <add key="CrystalImageCleaner-AutoStart" value="true" />
    <add key="CrystalImageCleaner-Sleep" value="60000" />
    <add key="CrystalImageCleaner-Age" value="120000" />
    <clear />
    <add name="LocalSqlServer" connectionString="Server=PROGDEV\SQLEXPRESS; Database=RESPEC; User ID=RspMembership; Password=Rsp!Login" providerName="System.Data.SqlClient" />
    <add name="SqlRoleManagerConnection" connectionString="Server=PROGDEV\SQLEXPRESS; Database=RESPEC; User ID=RspMembership; Password=Rsp!Login" providerName="System.Data.SqlClient" />
    <add name="RespecConnectionString" connectionString="Server=PROGDEV\SQLEXPRESS; Database=RESPEC; User ID=RspMembership; Password=Rsp!Login" providerName="System.Data.SqlClient" />
    <add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
    <sanitizer defaultProvider="HtmlAgilityPackSanitizerProvider">
    <add name="HtmlAgilityPackSanitizerProvider" type="AjaxControlToolkit.Sanitizer.HtmlAgilityPackSanitizerProvider" />
    <roleManager enabled="true" />
    <authentication mode="Forms">
    <forms name="RspWeb" loginUrl="/RspLogIn.aspx" />
    <membership defaultProvider="SqlProvider">
    <clear />
    <add name="SqlProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="LocalSqlServer" applicationName="RspWeb" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" passwordFormat="Clear" />
    <roleManager enabled="true" defaultProvider="SqlRoleManager">
    <add connectionStringName="SqlRoleManagerConnection" applicationName="RspWeb" name="SqlRoleManager" type="System.Web.Security.SqlRoleProvider" />
    <compilation debug="true" targetFramework="4.0">
    <add assembly="Microsoft.Build.Framework, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
    <add assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
    <add assembly="CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
    <add assembly="log4net, Version=, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
    <add assembly="CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
    <add assembly="CrystalDecisions.ReportAppServer.Controllers, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
    <add assembly="CrystalDecisions.ReportAppServer.DataDefModel, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
    <add assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
    <add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
    <!-- Microsoft recommended Security Settings -->
    <customErrors defaultRedirect="url" mode="RemoteOnly" />
    <httpCookies httpOnlyCookies="true" />
    <sessionState cookieless="UseCookies" />
    <trace enabled="false" localOnly="true" />
    <httpRuntime requestValidationMode="2.0" />

    <pages><controls><add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" /></controls></pages></system.web>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <assemblyIdentity name="HtmlAgilityPack" publicKeyToken="bd319b19eaf3b43a" culture="neutral" />
    <bindingRedirect oldVersion="" newVersion="" />
    <validation validateIntegratedModeConfiguration="false" />
    <add name="CrystalImageHandler.aspx_GET" verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" preCondition="integratedMode" />

    0 0


    Can anyone help me with my problem. I have a GridView that is being displayed on a ModalPopupExtender. The HoverMenuExtender is used to Edit/Delete the items in the gridView. My problem is that when the gridview has more number of rows than the ModalPopup height, the Edit/Delete buttons are not displayed correctly near the highlighted row. The Edit/Delete buttons are displayed randomly at the top.

    Please help me.

    Thanks in Advance

    - Sai

older | 1 | .... | 113 | 114 | 115 | (Page 116) | 117 | 118 | 119 | .... | 220 | newer