Showing posts with label AJAX. Show all posts
Showing posts with label AJAX. Show all posts

Thursday, March 11, 2010

How to add CSS effect to AJAX Calendar Extender Control?





Calendar Stylesheet
====================
.Cal_Theme .ajax__calendar_container
{
background-color: #EDCF81; border:solid 1px #cccccc;
}

.Cal_Theme .ajax__calendar_header
{
background-color: #FFFFEA; margin-bottom: 4px;
}

.Cal_Theme .ajax__calendar_title,
.Cal_Theme .ajax__calendar_next,
.Cal_Theme .ajax__calendar_prev
{
color: #004080; padding-top: 3px;
}

.Cal_Theme .ajax__calendar_body
{
background-color: #FFFFEA; border: solid 1px #cccccc;
}

.Cal_Theme .ajax__calendar_dayname
{
text-align:center; font-weight:bold; margin-bottom: 4px; margin-top: 2px;
}

.Cal_Theme .ajax__calendar_day
{
text-align:center;
}

.Cal_Theme .ajax__calendar_hover .ajax__calendar_day,
.Cal_Theme .ajax__calendar_hover .ajax__calendar_month,
.Cal_Theme .ajax__calendar_hover .ajax__calendar_year,
.Cal_Theme .ajax__calendar_active
{
color: #FFFFFF; font-weight:bold; background-color: #4A89B9;
}

.Cal_Theme .ajax__calendar_today
{
font-weight:bold;
}

.Cal_Theme .ajax__calendar_other,
.Cal_Theme .ajax__calendar_hover .ajax__calendar_today,
.Cal_Theme .ajax__calendar_hover .ajax__calendar_title
{
color: #000000;
}

---------------------------------------------------------------------------
Copy and paste the above stylesheet in one CSS file and Call to the control.

For Ex:
Add the below line in Head Section
<link href="../CSS/Calendar.css" rel="stylesheet" type="text/css" />


<cc1:CalendarExtender ID="txtdate_CalendarExtender" runat="server" Enabled="True"
CssClass="Cal_Theme" TargetControlID="txtdate">
</cc1:CalendarExtender>

Tuesday, February 16, 2010

Using Update Progress in another different way in AJAX Asp.net?

< asp:UpdateProgress AssociatedUpdatePanelID="UP" DisplayAfter="1" ID="UPro" runat="server">
< ProgressTemplate>
< div class="TransparentGrayBackground">
< div class="PageUpdateProgress">
< table border="0" cellpadding="0" cellspacing="0" style="border: solid 1px #000000;
height: 30px;">
< tr>
< td>
< img src="../images/load.gif" />
< /td>
< td>
Processing..
< /td>
< /tr>
< /table>
< /div>
< /div>
< /ProgressTemplate>
< /asp:UpdateProgress>


CSS
===
.TransparentGrayBackground
{
position: fixed;
top: 0;
left: 0;
background-color: white;
filter: alpha(opacity=70);
opacity: 0.7;
height: 100%;
width: 100%;
min-height: 100%;
min-width: 100%;
}



.PageUpdateProgress
{
background-color: white;
color: Black;
width: 200px;
text-align: center;
vertical-align: middle;
position: absolute;
bottom: 50%;
left: 45%;
font-family: Verdana;
font-size: small;
}

Click Here To View and Download Loader Gif Images

Friday, July 3, 2009

How to disable the button after click for avoiding duplicate entries?



< head>
< style type="text/css">
.Normal
{
border: dashed 1px #000000;
background-color: #FFFFFF;
cursor: pointer;
}

.Progress
{
border: dashed 1px #000000;
background-color: #EEEEEE;
background-position: center center;
background-repeat: no-repeat;
cursor: wait;
}
</style>

</head>

Add one div tag,Open the div tag after the < form> tag and close the div tag before the </ form> tag get closed.

< form id="frm_maintenance" runat="server">
< div id="Container" class="Normal">
.
.
.
.
.
</div>
</form>



Add this script lines into a seperate javascript file and call after the </ScriptManager> tag.

< script language="javascript" type="text/javascript" src="../Javascript/Ajax.js" />

if(Sys != null)
{
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_initializeRequest(InitializeRequest);
prm.add_endRequest(EndRequest);
}


function InitializeRequest(sender, args)
{
$get('Container').className = 'Progress';
$get(args._postBackElement.id).disabled = true;
}


function EndRequest(sender, args)
{
$get('Container').className = 'Normal';
$get(sender._postBackSettings.sourceElement.id).disabled = false;
}

Thursday, September 4, 2008

How to create dynamically create Accordian pane using VB.Net,ASP.Net?

Imports System.Data
Imports System.Data.SqlClient
Imports AjaxControlToolkit


Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Try
If Session("Emp_Id") = "" Then
ScriptManager.RegisterStartupScript(Me, Me.GetType, "", "window.open('login.aspx','_top');", True)
End If
If Not IsPostBack Then

Dim dthead As New DataTable
Dim dtcontent As New DataTable
Dim page_id As String
Dim j As Integer
Dim k As Integer
dt = objlogin.Select_PageId(Session("Emp_Id"))

page_id = dt.Rows(0)("ACCESS_PERMISSION").ToString()

If page_id.Length > 0 Then
dtcontent = objlogin.Select_PageName(page_id)
If dtcontent.Rows.Count > 0 Then
dthead = dtcontent.DefaultView.ToTable(True, "CATEGORY")

For j = 0 To dthead.Rows.Count - 1
Dim Pane As New AccordionPane()
Pane.HeaderContainer.Controls.Add(New LiteralControl("<b>"))
Pane.HeaderContainer.Controls.Add(New LiteralControl("   + " + dthead.Rows(j)("CATEGORY").ToString()))
Pane.HeaderContainer.Controls.Add(New LiteralControl("</b>"))
Dim dv As New DataView(dtcontent)
dv.RowFilter = "CATEGORY='" & dthead.Rows(j)("CATEGORY").ToString() & "'"
dv.Sort = "SUBLINK_ORDER"
If dv.Count > 0 Then
For k = 0 To dv.Count - 1
If dv(k)("PAGEURL").ToString().ToLower = "report_main.aspx" Then
Pane.ContentContainer.Controls.Add(New LiteralControl("   - <a style='text-decoration: none; color: #000000' target='_self' onclick=" & "window.open('report_main.aspx'); href='#'>" & dv(k)("PAGENAME").ToString() & "</a>"))
Else
Pane.ContentContainer.Controls.Add(New LiteralControl("   - <a style='text-decoration: none; color: #000000' target='mainFrame' href='" & dv(k)("PAGEURL").ToString() & "' >" & dv(k)("PAGENAME").ToString() & "</a>"))
End If
Pane.ContentContainer.Controls.Add(New LiteralControl("<br/>"))
Menu.Controls.Add(Pane)
Next
End If
Next
End If
End If
End If
Catch ex As Exception
objerror.ErrorDetails(ex)
End Try
End Sub
 
Feedback Form