Showing posts with label Ajax. Show all posts
Showing posts with label Ajax. Show all posts

Sunday, May 4, 2014

add title to ajax extender popup


example

<asp:scriptmanager id="ScriptManager1" runat="server">
</asp:scriptmanager>

<asp:button id="Button1" runat="server" text="Button" />

<cc1:modalpopupextender id="ModalPopupExtender1" runat="server"
cancelcontrolid="btnCancel" okcontrolid="btnOkay"
targetcontrolid="Button1" popupcontrolid="Panel1"
popupdraghandlecontrolid="PopupHeader" drag="true"
backgroundcssclass="ModalPopupBG">
</cc1:modalpopupextender>

<asp:panel id="Panel1" style="display: none" runat="server">
<div class="HellowWorldPopup">
                <div class="PopupHeaderClasss" id="PopupHeader">Header</div>
                <div class="PopupBody">
                    <p>This is a simple modal dialog</p>
                </div>
                <div class="Controls">
                    <input id="btnOkay" type="button" value="Done" />
                    <input id="btnCancel" type="button" value="Cancel" />
</div>
        </div>
</asp:panel>

<style>
.PopupHeaderClasss{
padding0.3em 0.1em;
 text-alignleft;
 border:solid 1px black;
 background-color#5871c3;
 font-weight:bold;
    }
</style>

Sunday, May 6, 2012

Ajax Autocomplete extender doesnt retrieve data on IIS

when building asp.net website with start option set to "IIS"  and test an autocomplete extender that retrieve data using a webservice  , it doesnt retrieve data
using "Fiddler" to catch the error , it gets

System.InvalidOperationException: Request format is invalid: application/json; charset=utf-8.
at System.Web.Services.Protocols.HttpServerProtocol.ReadParameters()
at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()

solution  :
at the web.config file  =>system.webserver => handlers => add these lines

 <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
 <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>