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

Updatepanel still reloades all page

0
0

Hi,

I have a code like this:

<asp:UpdatePanel ID="UpdatePanelMjesto" runat="server">
<ContentTemplate>
<asp:Label ID="lblMjesto" runat="server" Text="MJESTO:" Width="150px" />
<asp:Button ID="btnDodajMjesto" runat="server" Text="Dodaj mjesto" />
<asp:DropDownList ID="ddlMjesto" runat="server" Width="705px"/>
<br />
<asp:Repeater ID="repeaterList" runat="server" EnableViewState="false">
<ItemTemplate>
<div>
<div>
<asp:Label ID="lblName" runat="server" CommandName="lblName" Text='<%# Eval("MJESTO")%>' Width="700px" />
</div>
<div>
<asp:LinkButton ID="linkButtonDelete" runat="server" CommandName="LinkButtonDelete" OnClientClick="return confirm('Are you certain you want to delete this record?');">
<asp:Image ID="ImageDelete" runat="server" ImageUrl="~/slike/ikone/ne.png" Height="25px" />
</asp:LinkButton>
</div>
</div>
</ItemTemplate>
</asp:Repeater>
</ContentTemplate>
</asp:UpdatePanel>

But each time I do anything in updatepanel (prest delete or pres the button inside upate panell whole page reloads.

Any Idea?

Thx 


Fill barChart in code behind

0
0

I am trying to get the barchart to fill with my data, but what happens is that it errors out the rest of my page and I shows nothing, but doe snto show an error on the page.  Do not know if this is the correct way to fill a barchart as I cannot find many examples of it online only one and it does not seem to work correctly.

 

Private Sub FILLChart()
        sql = "Exec sp_SRPAttendance " & ddlSrpEvent.SelectedValue & ", " & ddlSRPDay.SelectedValue

        myDataTable = New DataTable
        myDataTable = getReader(sql)

        Dim Sced As Decimal() = New Decimal() {myDataTable.Rows(0)(0)}
        Dim ScedIN As Decimal() = New Decimal() {myDataTable.Rows(0)(1)}
        Dim ScedOut As Decimal() = New Decimal() {myDataTable.Rows(0)(2)}


        ChrtInOut.Series(0).Name = "Sceduled"
        ChrtInOut.Series(0).Data = Sced

        ChrtInOut.Series(1).Name = "IN"
        ChrtInOut.Series(1).Data = ScedIN

        ChrtInOut.Series(1).Name = "OUT"
        ChrtInOut.Series(1).Data = ScedOut
    End Sub<asp:BarChart ID="ChrtInOut" runat="server" ChartHeight="200"  ChartWidth="260"><Series><asp:BarChartSeries Name="Sceduled" /></Series><Series><asp:BarChartSeries Name="IN" /></Series><Series><asp:BarChartSeries Name="OUT" /></Series></asp:BarChart>

FancyBox in Gridview Updatepanel BlockUI Problem

0
0

Hi,

I have master page layout.Fancybox apply to gridview column product detail.fancybox style is ajax. and gridview inside update panel.

BlockUI plugins also apply to block gridview when paging or sorting.Gridview paging and sorting work and fancybox also work.

The problem is that when fancybox closed gridview paging and sorting not work but fancybox work with all rows.

before clicking fancybox, gridview paging and sorting work fine.

Please help if any one know this issue.

Pulling a JavaScript value into an ASCX at Runtime

0
0

Hello, everyone. I will try and describe my situation as best I can.

I have a text input as a variable via JavaScript inside an HTML file. In an ascx behind the scenes of the site itself I am attempting to reference this variable at run-time based on what the user enters on the site. So the question I have is potentially two fold.

1) is it possible to use C# in ASP.NET to access a variable in JavaScript sitting in an HTML source?

2) if it is then how? is this done with a namespace and if so which one?

Thanks for reading.

Error: does not contain a script with hash code "3cf12cf1'".

0
0

We are seeing quite a few of these errors on our site.

AjaxControlToolkit

Assembly "AjaxControlToolkit, Version=4.1.7.123, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" does not contain a script with hash code "3cf12cf1'".

DeserializeScriptEntries

   at AjaxControlToolkit.ToolkitScriptManager.DeserializeScriptEntries(String serializedScriptEntries, Boolean loaded)
   at AjaxControlToolkit.ToolkitScriptManager.OutputCombinedScriptFile(HttpContext context)
   at AjaxControlToolkit.ToolkitScriptManager.OnInit(EventArgs e)
   at System.Web.UI.Control.InitRecursive(Control namingContainer)
   at System.Web.UI.Control.InitRecursive(Control namingContainer)
   at System.Web.UI.Control.InitRecursive(Control namingContainer)
   at System.Web.UI.Control.InitRecursive(Control namingContainer)
   at System.Web.UI.Control.InitRecursive(Control namingContainer)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)



image link will change to pure text in HTMLEditorExtender

0
0

Hi guys, i am using HTMLEditorExtender as my content editor.

I found that image will change to pure text after saved. pls advice...

 

update my database every 5 seconds that the webpage is active

0
0

Hi

What I want to do is to update my database every 5 seconds that the webpage is active.

I wish to use this to monitor how long people are staying on my page and thus how much of the video they are watching. I am guessing there is a way to do this using Ajax or javascript.

If anyone know how to achieve this that would be great.

 

Many thanks

Facing issue while setting style: display of a panel

0
0

Hi All,

 I am facing one issue.But dont know whether this is issue or web page works like this only.

Following is the scenario:

I have a image Buttom in my page like below

<asp:ImageButton ID="imgBtnActions" OnClick="imgBtnActions_OnClick" ImageUrl="~/Images/icon-action_up.png?V=1"                                                runat="server" />

When i click on this button its open a Panel with some linkbutton inside the Panel. This display happened in code behind like this. ShowHideMenuAction() is called from imgBtnActions_OnClick() method.

 private void ShowAndHideActionsMenu()        {            if (pnlExpAction.Style["display"]  == "block" )            {                pnlExpAction.Style["display"] ="none";                imgBtnActions.ImageUrl = "~/Images/icon-action_down.png";            }            else            {                pnlExpAction.Style["display"] = "block";                imgBtnActions.ImageUrl = "~/Images/icon-action_up.png";            }        }
When i click any of the link button inside the Panel its minimize the paenl and do some serverside function.this panel with image button all in update panel. Minimizng happen like this 
  function InitializeRequest(sender, args) {            var asyncPostBackElement = sender._postBackSettings.asyncTarget;            if ((asyncPostBackElement == '<%= lnkBtnExplorerSave.UniqueID %>') || (asyncPostBackElement == '<%= lnkBtnExplorerCopyFund.UniqueID %>') || (asyncPostBackElement == '<%= lnkBtnExplorerCreateChildFund.UniqueID %>') || (asyncPostBackElement == '<%= lnkBtnExplorerExclusion.UniqueID %>')) {                var panel = document.getElementById('<%=pnlExpAction.ClientID %>');                var img = document.getElementById('<%=imgBtnActions.ClientID %>');                panel.style.display = 'none';                img.setAttribute('src''../Images/icon-action_down.png');            }        }
This code minimize the paenl.But problem happend when i click the img button again.When i click the button it calls the ShowAndHideActionMenu() as written before.I kept a debugger there.It is showing still the display type is "block" though i made it "none" in ajax InitializeREquest() method.So onclick of that it is not displaying the panel since it is goign to the else part.
Could anyone please tell me why its showing "block" when i already made "none" ?
Thanks & Regards,
Joy

                       

Twitter feed returns empty data but was working previously.

0
0

I use MS VWD 2010 Express(version 3.5) and Visual basic to develop a website for my rugby club. 

I set up an Ajax twitter control linked to our twitter account and this worked fine.

It has now just started to return the "empty data template" even though there are a number of recent tweets

No changes have been made to either the website or the Twitter account.  Any suggestions as to why the tweets aren't showing?

The code for my control is shown below:

Thanks

John

         <asp:Twitter ID="Twitter1" runat="server" IncludeReplies="True"  Width="265px" Count="4"
             IncludeRetweets="True"  ScreenName="Tabard_RFC">
              <EmptyDataTemplate>
             There are no matching tweets.
           </EmptyDataTemplate>
<LayoutTemplate>
<div id="Div5" runat="server" class="ajax__twitter_header"><asp:Image ID="Image4" runat="server"
        ImageUrl="~/images/Tabard.jpg"></asp:Image>

<h4 id="H1" runat="server">Tabard Tweets</h4>
</div>
<ul id="Ul2" runat="server" class="ajax__twitter_itemlist" style="margin:0px;"><asp:PlaceHolder runat="server" ID="ItemPlaceholder"></asp:PlaceHolder>
</ul>

</LayoutTemplate>
         </asp:Twitter>

hover menu extender not showing up where it is supposed to be

0
0

Situation: I have made a navigation menu using div's and asp:LinkButtons. I would like to use the ajax toolkit to make a hover menu extender showing a panel underneath each div.

Problem: My hover menu works find when experementing but when I applied it to my div navigation menu it could only pop up outside the main div, floating on the right side. I tried applying the other forum posts but I think my problem might be CSS related, I'm not sure.

Question/profile: as my knowledge of ASP is purely from web tutorials I'd like to request to be pointed in to the right direction. Also if possible, it would be nice if somebody could show me with code how I can achieve my goal?

Ressources: !watchout I only included my master page because the default.aspx is empty for now

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site1.master.cs" Inherits="RafanovaWeb.Site1" %><%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"><title>Rafanova</title><link href="CSS/CssReset.css" rel="stylesheet" /><style type="text/css">
        body {
            text-align: center;
        }

        #wrapper {
            min-width: 1010px;
        }

        #main {
            width: 1000px;
            margin-left: auto;
            margin-right: auto;
            clear: both;
        }

        #top {
            clear: both;
        }

        #navigation {
            position: relative;
            clear: both;
        }
            #navigation p {
            color: #000 ;
            margin-left: 3px;
            margin-top: 20px;
            text-decoration: none;
        }

            .navButton {
            width: 160px;
            height: 53px;
            float: left;
            font-family: "myriad pro";
            text-align: left;
            position: relative;
        }
            .navFiller {
                width: 120px;
                height: 53px;
                float: left;
            }

        #middle {
            text-align: left;
            clear:both;
        }

        #footer {
            clear:both;
        }

        /* TEXT CONTROLER */
        p {
            font-family: 'Trebuchet MS';
        }

        h1 {
            font-family: 'Trebuchet MS';
        }

        /* EXTRA QUICK CLASSES*/

        .hyper {
            text-decoration: none;
        }

        /* Menu Css*/
        .navPanel {
            position: absolute;
            top: 0px;
            left: 0px;
            display: block;
            visibility: hidden;
            z-index: 1000;
        }
        .absolute {
            position:absolute;
        }
        #HoverMenuExtender1 {
            z-index: 1001;
        }

    </style><asp:ContentPlaceHolder ID="head" runat="server"></asp:ContentPlaceHolder></head><body><form id="form1" runat="server"><asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager><div id="wrapper"><div id="main"><div id="top"><div><p style="font-family: 'Edwardian Script ITC'; font-size: 80px; color: #72625A; text-align: left; margin-top: 15px;">Rafanova</p><hr /></div><div id="navigation"><asp:LinkButton runat="server" id="btnHome" href="default.aspx"><div class="navButton"><p>Home</p><hr /></div></asp:LinkButton><div class="navFiller"></div><asp:LinkButton runat="server" id="btnRapports" href="#"><div class="navButton"><p>Rapports</p><hr /></div></asp:LinkButton><div class="navFiller"></div><asp:LinkButton runat="server" id="btnData" href="#"><div class="navButton"><p>Data</p><hr /></div></asp:LinkButton><asp:HoverMenuExtender ID="HoverMenuExtender1" runat="server" TargetControlID="btnData" PopupControlID="PanelData" OffsetX="6" PopDelay="250" HoverCssClass=""  /><asp:Panel ID="PanelData" runat="server" CssClass="navPanel">
                        panel achieved</asp:Panel><div class="navFiller"></div><asp:LinkButton runat="server" id="btnInfo" href="#"><div class="navButton"><p>Info</p><hr /></div></asp:LinkButton></div><%-- stop top --%><div id="middle"><asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"></asp:ContentPlaceHolder></div><%-- stop middle --%><div id="footer"></div><%-- stop footer --%></div><%-- stop Main --%></div><%-- stop wrapper --%></form></body></html>

!using visual studio 2012

AutoCompleteExtender nested in GridView not working in Chrome

0
0

Hello,

I have an AutoCompleteExtender connected to an editable textbox, nested inside a GridView. In Firefox and IE, the code works as it should: the user types a few characters, and a list of suggestions appears. However, this does not happen in Chrome 27.

I created the AutoCompleteExtender following the directions given here: http://www.asp.net/ajaxlibrary/act_AutoComplete_Simple.ashx, and if I use the extender by itself (outside of a GridView) in Chrome, it works fine. Unfortunately, I need it to work within a GridView for this project, so if anyone has a solution, it would be much appreciated. My code is below. FYI, I am coding in C#, using Ajax Control Toolkit 4.1.7.429, in Visual Studio 2010 (if that last matters at all.)

In my markup:

<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></ajaxToolkit:ToolkitScriptManager><asp:GridView ...><asp:TemplateField ...><ItemTemplate><asp:TextBox ID="dogHandlerEdit" runat="server"></asp:TextBox><ajaxToolkit:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server"
TargetControlID="dogHandlerEdit" ServiceMethod="GetCompletionList" UseContextKey="True"
CompletionListCssClass="handlerAutoComplete"></ajaxToolkit:AutoCompleteExtender></ItemTemplate></asp:TemplateField></asp:GridView>

And then in my code-behind:

[System.Web.Services.WebMethodAttribute(), System.Web.Script.Services.ScriptMethodAttribute()]
    public static string[] GetCompletionList(string prefixText, int count, string contextKey)
    {
        List<string> lstList = new List<string>();

        // Create data context
        DataContext dc = new DataContext( ... );

        // Get dog info
        var people = (from p in dc.PPL_Peoples
                      //where (p.PPL_FirstName.Contains(prefixText) == true || p.PPL_LastName.Contains(prefixText) == true) && p.PPL_Active == true
                      where (p.PPL_FirstName.StartsWith(prefixText) == true || p.PPL_LastName.StartsWith(prefixText) == true) && p.PPL_Active == true
                      orderby p.PPL_LastName ascending, p.PPL_FirstName ascending
                      select new
                      {
                          p.PPL_FirstName,
                          p.PPL_LastName

                      }).Take(30);

        // Add names to the list
        foreach (var person in people)
        {
            lstList.Add(person.PPL_FirstName + " " + person.PPL_LastName);
        }

        return lstList.ToArray();
    }

Thanks in advance for your help.


Cascading Drop Downs - Method Error 500

0
0

Hi, I have some cascading dropdowns which work great when previewing the page locally through VS.

But when I upload my files to my web host and preview the page I get an error message Method Error 500 on each of the dropdown boxes.

As well as my own pages I have taken from the web the example I used, and I still get the same error. The example that I used is here - http://www.mikeborozdin.com/post/creating-linked-drop-down-lists-with-the-cascadingdropdown-control.aspx

On reviewing the error through Fiddler the errors show:

Unknown web method GetContinents

Unknown web method GetCountries

Unknown web method GetTerritories

Unknown web method GetCities

Thanks for any advice I've been stuck on this for days...

Editor Control & Carriage Return

0
0

I'm using the AJACS Calendar Control in an app I'm working on.  When creating an SSRS report based on the HTML data I found that a carriage return doesn't necessarily mean <P>.  I don't want to display the control with DesignMode and PreviewMode options.  That would require teaching the end user community HTML so as to insure they were inserting </p> instead of </br>.

Is there a way for the editor control to display a paragraph instead of just a new line?  Hitting return twice doesn't render 2 lines in SSRS either.

Help?

 

Thanks

Timer Causing 2 UpdatePanels To Refresh

0
0

Very simple, I have 2 update panels on my page. Both are grabbing some basic but different search results from a database.

My second Update panel has a timer in it set to 3 seconds, just for now while developing.

Both panels are the basic drag and drop with no additional functionallity added to them and ChildrenAsTriggers="true".

The timer which is inside my update panel like so.

<asp:UpdatePanel ID="UpdatePanel2" runat="server" ChildrenAsTriggers="true"><ContentTemplate><fieldset><legend>Driver Status</legend><asp:Literal ID="driverLiteral" runat="server"></asp:Literal></fieldset><asp:Timer ID="Timer1" runat="server" Interval="3000"></asp:Timer></ContentTemplate></asp:UpdatePanel>

What I can't figure out is my Timer1 is causing both Update Panels to postback, I thought from everything I've read placing a timer within an updatepanel would make the Timer a child of the updatepanel causing only that panel to postback.

So what is the problem here?

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);   
        }

    }




Error "The requested script resource 'Common.Common.js' requires version 'AjaxControlToolkit, Version=4.1.60501.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' of the ASP.NET AJAX Framework."

0
0

I am getting the below error on my application

The requested script resource 'Common.Common.js' requires version 'AjaxControlToolkit, Version=4.1.60501.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' of the ASP.NET AJAX Framework. To use this resource, make sure that the application references version 'AjaxControlToolkit, Version=4.1.60501.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e'.

The application was working fine and all of a sudden we get this error. The application is running on .NET 4.0 using ajaxtoolkit 4.1.60501.0

Any help at the earliest is highly appreciated.

Client side web service

0
0

Hi, I havewebservice added in Scripmanager Scriptreference tag

  <asp:ScriptManager ID="ScriptManager1" runat="server">
          <Services>
            <asp:ServiceReference Path="~/MyService.asmx" />
        </Services>
    </asp:ScriptManager>

And used the methods of webservice at client side.

I have usedthe following in web.config file to open the application in multiple tabs with different session id:

 <sessionState mode="InProc" timeout="20" cookieless="UseUri">
    </sessionState>

Problem:

I call my page i get error webservice "InvalidException" Object reference not set to the instance of the object.

Please anyone can help..would be greatly appreciated..Thanks :(

autocomplete extender not working

0
0

Hello,

I m trying to add autocomplete extender in code without using webservice i get the list but it not displaying in final result

My code is as Following

.aspx code----

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Script_Master.aspx.cs" Inherits="ISHM.Admin.Script_Master" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" EnablePartialRendering="true"  EnablePageMethods="true"   runat="server">
</asp:ToolkitScriptManager>
<asp:TextBox ID="Txtsearch" runat="server" ></asp:TextBox>
    <asp:AutoCompleteExtender ID="Txtsearch_AutoCompleteExtender" runat="server"
        DelimiterCharacters="" Enabled="True"  MinimumPrefixLength="1" EnableCaching="true" CompletionSetCount="1" CompletionInterval="1000"
        TargetControlID="Txtsearch" ServiceMethod="getDetail"   UseContextKey="True">
    </asp:AutoCompleteExtender>
    <br />

   
</asp:Content>

--------------------------

aspx.cs code as------------

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using ISHM.Globalclasses;
using System.Data;

namespace ISHM.Admin
{
    public partial class Script_Master : System.Web.UI.Page
    {
        Query objQry1 = new Query();
        [System.Web.Services.WebMethod]
        [System.Web.Script.Services.ScriptMethod]
        //[System.Web.Script.Services.ScriptMethod()]
        //[System.Web.Services.WebMethod]
        public static List<string> getDetail(string prefixText, int count)
        
        {
            Query objQry = new Query();
            List<string> DetailList = new List<string>();
            DataTable Dt =objQry.GetScriptdetail();
            //DataView dv = new DataView();
            //dv = Dt.DefaultView;
            //dv.RowFilter = "ISINCODE like '%" + prefixText + "%' OR NSECODE like'%" + prefixText + "%' OR NAME like'%" + prefixText + "%'";
            //DataTable DT1 = dv.ToTable();
            for (int i = 0; i < Dt.Rows.Count; i++)
            {   
                DetailList.Add(Dt.Rows[i]["name"].ToString());
            }
            return DetailList;
        }
        protected void Page_Load(object sender, EventArgs e)
        {

        }


    }
}

please help me where is that problem..

Double-Click required to set focus to UserControl(s)

0
0

I have a form that has selectable tabs on the left, and a panel to the right that contains user controls.  The user controls are basically just forms.  The tab on the left basically controls which user control is visible at any time.  When I first log into the application, if I click a tab, it sets focus to the set of tabs then another click will select one.  I want the tabs to automatically have the ability to be clicked without first setting focus so the dynamic content works without this glitch.

In a nutshell, after logging into the application, I can see the correct panel on the right and the tab on the left for the first panel is active, however, the application requires a double-click to activate other tabs.  Once this is done the first time, the tabs work perfectly no matter what I do.

There appears to be some kind of activation or focus problem but I'm not sure what's going on.

Any ideas?

Thanks,

-D

how to change image src of div from ajax

0
0

 $(document).ready(function () {

$(".Zoom1").click(function () {
alert("zoom");
ImgName = this.name
$.post("/Controls/ZoomTo.ashx?ImageName=" + ImgName + "&Add=1", {},
function (response) {
if (response != ' ') {
$('#ScrapZoomImg').src="response "
}
});

Html :

    <div id="ScrapZoomImg"></div>

AShx :

Public Class ZoomTo
Implements IHttpHandler
Implements IRequiresSessionState
Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest

Dim imgname As String = context.Request.QueryString("ImageName")
Dim PageId As String = HttpContext.Current.Session("ClientId")
Dim dsBk As DataSet = ScrapBookHelper.GetScrapbookZoomImages(imgname)

HttpContext.Current.Session("ZoomImages") = dsBk.Tables(0).Rows(0).Item(2)

context.Response.Write(HttpContext.Current.Session("ZoomImages"))
End Sub
ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
Get
Return False
End Get
End Property

End Class



Viewing all 5678 articles
Browse latest View live




Latest Images