Click here to Skip to main content
15,879,239 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Page looks like this and also I have pasted the required AjaxControlToolkit.dll file into bin folder but still ajax not working!!!

XML
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
<!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>Collapsible Panel Example</title>
</head>
<body>
<form id="form1" runat="server">
<ajax:ToolkitScriptManager ID="ScriptManager1" runat="server">
</ajax:ToolkitScriptManager>
<div>
<asp:Panel ID="pnlClick" runat="server" >
<div style="height:30px; vertical-align:middle">
<div style="float:left; color:White;padding:5px 5px 0 0">
Collapsible Panel
</div>
<div style="float:right; color:White; padding:5px 5px 0 0">
<asp:Label ID="lblMessage" runat="server" Text="Label"/>
<asp:Image ID="imgArrows" runat="server" />
</div>
<div style="clear:both"></div>
</div>
</asp:Panel>
<asp:Panel ID="pnlCollapsable" runat="server" Height="0" >
<table align="center" width="100%">
<tr>
<td></td>
<td>
<b>Registration Form</b>
</td>
</tr>
<tr>
<td align="right" >
UserName:
</td>
<td>
<asp:TextBox ID="txtuser" runat="server"/>
</td>
</tr>
<tr>
<td align="right" >
Password:
</td>
<td>
<asp:TextBox ID="txtpwd" runat="server"/>
</td>
</tr>
<tr>
<td align="right">
FirstName:
</td>
<td>
<asp:TextBox ID="txtfname" runat="server"/>
</td>
</tr>
<tr>
<td align="right">
LastName:
</td>
<td>
<asp:TextBox ID="txtlname" runat="server"/>
</td>
</tr>
<tr>
<td align="right">
Email:
</td>
<td>
<asp:TextBox ID="txtEmail" runat="server"/>
</td>
</tr>
<tr>
<td align="right" >
Phone No:
</td>
<td>
<asp:TextBox ID="txtphone" runat="server"/>
</td>
</tr>
<tr>
<td align="right" >
Location:
</td>
<td align="left">
<asp:TextBox ID="txtlocation" runat="server"/>
</td>
</tr>
<tr>
<td></td>
<td align="left" >
<asp:Button ID="btnsubmit" runat="server" Text="Save"/>
<input type="reset" value="Reset" />
</td>
</tr>
</table>
</asp:Panel>
<ajax:CollapsiblePanelExtender
ID="CollapsiblePanelExtender1"
runat="server"
CollapseControlID="pnlClick"
Collapsed="true"
ExpandControlID="pnlClick"
TextLabelID="lblMessage"
CollapsedText="Show"
ExpandedText="Hide"
ImageControlID="imgArrows"
CollapsedImage="downarrow.jpg"
ExpandedImage="uparrow.jpg"
ExpandDirection="Vertical"
TargetControlID="pnlCollapsable"
ScrollContents="false">
</ajax:CollapsiblePanelExtender>
</div>
</form>
</body>
</html>
Posted
Comments
07navneet 13-Feb-12 5:28am    
ajax is not running on my PC but the same code works fine in my friend's laptop! Both of us have got ajaxcontroltoolkit.dll(3.5.11119.0)
thatraja 14-Feb-12 3:36am    
What's the error message? Check it in firefox error console & do let me know
07navneet 14-Feb-12 4:28am    
no error message!!
07navneet 14-Feb-12 4:28am    
no error message!!!

Hi,

As I can see your example must work.

Only thing why you cant see your "panels" is because of text style which is set to White and in combination with white background they are not visible on screen...

Remove
CSS
color: White;
from div elements and then try...
 
Share this answer
 
Comments
07navneet 1-Feb-12 4:38am    
still the same problem!!!
Hi,

Try this it should be working...

HTML
]]>
]]>
 
Share this answer
 
Comments
Martin Arapovic 1-Feb-12 4:24am    
Yes, I forget to add that. Tag prefix declaration must be added in page or in web.config. :)
07navneet 1-Feb-12 4:33am    
@martin-cud u explain a bit more?
Hi,

By first submition has an error...
Try this if could help...

HTML
]]>
]]>
 
Share this answer
 
Comments
07navneet 1-Feb-12 4:34am    
sorry! doesnt effect!!
Al Moje 1-Feb-12 4:34am    
I tried to submit all solution but ecountered server error:
I think you should change white color to either blue:
example:
<asp:ScriptManager ID="ScriptManager1" runat="server">

<div>
<asp:Panel ID="pnlClick" runat="server" ForeColor="#66CCFF">
<div style="height: 30px; vertical-align: middle; color: #FFFFFF; background-color: #66CCFF;">
<div style="float: left; padding: 5px 5px 0 0">
Collapsible Panel
</div>
<div style="float: right; color: Blue; padding: 5px 5px 0 0">
<asp:Label ID="lblMessage" runat="server" Text="Label" />
<asp:Image ID="imgArrows" runat="server" />
</div>
<div style="clear: both">
</div>
</div>
07navneet 1-Feb-12 4:41am    
how come color combination effect this?? now i have removed colors but same problem persists!
Al Moje 1-Feb-12 4:46am    
change you backgroud color into blue.
In your solution you have a white forecolor with white background, that is
why you see nothing. Also change your script manager to:
<asp:ScriptManager ID="ScriptManager1" runat="server">
Hi,


Try this...

]]>
 
Share this answer
 
Comments
07navneet 1-Feb-12 4:43am    
!!?? already told you its not working? is there something i need to change in web.config file?
Al Moje 1-Feb-12 4:53am    
Sorry! This is not the whole solution I intended to answer. When I submit my whole solution answer, there were a server popup message error...
Just change the Script Manager you have defined in you solution and then change the color as I had mention on my previous comments above and it should be working....
07navneet 1-Feb-12 5:28am    
changed the color and scriptmanager BUT...same problem!!
Martin Arapovic 1-Feb-12 8:15am    
I'll sent you a working solution on mail...
Check mail in about 15 mins....
07navneet 2-Feb-12 1:20am    
hey I am working on MS-VS2008(3.5)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900