Visualizzazione dei risultati da 1 a 6 su 6
  1. #1
    Utente di HTML.it
    Registrato dal
    Mar 2002
    Messaggi
    20

    AutoCompleteextender Firefox-Explorer

    Ciao a tutti, sto smanettando un po con AJAX ma ho riscontrato un problema per quanto riguarda il control Autocompleteextender.
    Su Explorer questo control abbinato ad una TextBox funziona bene, mentre su Firefox tra la TextBox e la tendina si forma uno spazio.
    Come posso risolvere questa cosa?

    Allego un'immagine che sicuramente molto più esplicativa

    Grazie
    Immagini allegate Immagini allegate

  2. #2
    Utente di HTML.it L'avatar di Xinod
    Registrato dal
    Sep 2000
    Messaggi
    13,649
    l' originale non lo fa,
    come si potrebbe risolvere il problema senza vedere la tua implementazione?

  3. #3
    Utente di HTML.it
    Registrato dal
    Mar 2002
    Messaggi
    20

    Ecco il codice

    Ecco il codice....

    ------------Default.aspx--------------

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
    <%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <title></title>
    </head>
    <body>
    <form id="form1" runat="server">
    <div>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>


    AutoCompleteextender



    </div>
    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
    <cc1:AutoCompleteExtender ID="TextBox1_AutoCompleteExtender" runat="server"
    DelimiterCharacters="" Enabled="True" ServiceMethod="GetCompletionList"
    ServicePath="" TargetControlID="TextBox1" UseContextKey="True">
    </cc1:AutoCompleteExtender>
    </form>
    </body>
    </html>


    -----------Default.aspx.cs--------------


    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;

    public partial class _Default : System.Web.UI.Page
    {
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    [System.Web.Services.WebMethodAttribute(), System.Web.Script.Services.ScriptMethodAttribute()]
    public static string[] GetCompletionList(string prefixText, int count, string contextKey)
    {
    if (count == 0) count = 1;
    List<string> stringList = new List<string>(count);
    for (int i = 0; i < count; i++)
    {
    stringList.Add(prefixText + i.ToString());
    }
    return stringList.ToArray();
    }
    }

  4. #4
    Utente di HTML.it L'avatar di Xinod
    Registrato dal
    Sep 2000
    Messaggi
    13,649
    troppo hardcoded per capirci alcunche'

    qui sembrano trattare il problema e offrire una soluzione
    http://www.codeplex.com/AjaxControlT...rkItemId=18584

    probabilmente anche qui, a fine discussione
    http://forums.asp.net/p/1344390/2737016.aspx

    a te provare,
    buon proseguimento

  5. #5
    Utente di HTML.it
    Registrato dal
    Mar 2002
    Messaggi
    20
    mmmm..... si c'è qualcosa ma non capisco perchè succede solo ad alcuni,per il momento non ho ancora la soluzione. Se qualcuno trova qualche indizio....
    Ciao

  6. #6
    Utente di HTML.it
    Registrato dal
    Mar 2002
    Messaggi
    20
    -----------Default.aspx.cs
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;

    public partial class _Default : System.Web.UI.Page
    {
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    [System.Web.Services.WebMethodAttribute(), System.Web.Script.Services.ScriptMethodAttribute()]
    public static string[] GetCompletionList(string prefixText, int count)
    {
    if (count == 0) count = 1;
    List<string> stringList = new List<string>(count);
    for (int i = 0; i < count; i++)
    {
    stringList.Add(prefixText + i.ToString());
    }
    return stringList.ToArray();
    }
    }


    -----------Default.aspx-------------


    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

    <%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
    <title></title>
    </head>
    <body>
    <form id="form1" runat="server">
    <div>

    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>

    </div>


    Prova</p>
    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
    <cc1:AutoCompleteExtender
    ID="TextBox1_AutoCompleteExtender"
    runat="server"
    Enabled="True"
    ServiceMethod="GetCompletionList"
    ServicePath=""
    TargetControlID="TextBox1"
    MinimumPrefixLength="2"
    CompletionInterval="1000"
    EnableCaching="true"
    CompletionSetCount="20"
    DelimiterCharacters=";, :"
    CompletionListCssClass="autocomplete_completionLis tElement"
    CompletionListItemCssClass="autocomplete_listItem"
    CompletionListHighlightedItemCssClass="autocomplet e_highlightedListItem"
    ShowOnlyCurrentWordInCompletionListItem="true" >
    </cc1:AutoCompleteExtender>


    Prova2</p>
    </form>
    </body>
    </html>

    ------------css-------------

    .autocomplete_completionListElement
    {
    overflow : auto;
    height : 200px;
    border-width : 1px;
    border-style : solid;
    list-style-type : none;
    margin:0px;
    padding: 0px;
    }
    .autocomplete_highlightedListItem
    {
    background-color: #ffff99;
    color: black;
    padding: 1px;
    }
    .autocomplete_listItem
    {
    background-color : window;
    color : windowtext;
    padding : 1px;
    }

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.