Thursday, 26 February 2015

MS Chart 3D Configuration in asp.net C#

//HTML

<asp:Chart ID="Chart2" runat="server" style="min-width:99%; display:none;"  onmouseover="return hidedownloadchart('ch2d','ch1d','ch3d');" >
            <Series>  
            </Series>
            <ChartAreas>
                <asp:ChartArea Name="ChartArea1">
                </asp:ChartArea>
            </ChartAreas>
             <Legends>
            <asp:Legend TextWrapThreshold="200" font ="11px"></asp:Legend>
            </Legends>
        </asp:Chart>


//ChartArea

System.Web.UI.DataVisualization.Charting.ChartArea chartArea1 = new System.Web.UI.DataVisualization.Charting.ChartArea();
        chartArea1.Area3DStyle.IsClustered = true;
        chartArea1.Area3DStyle.IsRightAngleAxes = false;
        chartArea1.Area3DStyle.PointGapDepth = 900;
        chartArea1.Area3DStyle.Rotation = 162;
        chartArea1.Area3DStyle.WallWidth = 25;
        chartArea1.AxisX.LabelStyle.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
        chartArea1.AxisX.LineColor = System.Drawing.Color.Teal;
        chartArea1.AxisX.MajorGrid.Enabled = false;
        chartArea1.AxisX.MajorGrid.LineColor = System.Drawing.Color.Teal;
        chartArea1.AxisX.MajorTickMark.Enabled = false;
        chartArea1.AxisX2.MajorGrid.Enabled = false;
        chartArea1.AxisX2.MajorTickMark.Enabled = false;
        chartArea1.AxisY.LabelStyle.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
        chartArea1.AxisY.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
        chartArea1.AxisY.MajorGrid.Enabled = false;
        chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.Teal;
        chartArea1.AxisY.MajorTickMark.Enabled = false;
        chartArea1.AxisY2.MajorGrid.Enabled = false;
        chartArea1.AxisY2.MajorTickMark.Enabled = false;
        chartArea1.BackColor = System.Drawing.Color.Transparent;
        chartArea1.BackGradientStyle = System.Web.UI.DataVisualization.Charting.GradientStyle.TopBottom;
        chartArea1.BackSecondaryColor = System.Drawing.Color.Transparent;
        chartArea1.BorderColor = System.Drawing.Color.Teal;
        chartArea1.Name = "Area1";
        chartArea1.ShadowColor = System.Drawing.Color.Gainsboro;

Thursday, 19 February 2015

Select De-Select all nodes of the Treeview in asp.net using jquery




//html

<asp:TreeView ID="TreeView1" ShowCheckBoxes="All" runat="server" NodeIndent="15"   >
                            <HoverNodeStyle Font-Underline="True" ForeColor="#6666AA" />
                            <NodeStyle Font-Names="Arial" Font-Size="9pt" ForeColor="Black" HorizontalPadding="1px"
                                NodeSpacing="0px" VerticalPadding="1px" ></NodeStyle>
                            <ParentNodeStyle Font-Bold="False" />

                        </asp:TreeView>

<script>

Sys.Application.add_load(jScript);
                function jScript() {
                    $("[id*=TreeView1] input[type=checkbox]").bind("click", function () {
                        var table = $(this).closest("table");
                        if (table.next().length > 0 && table.next()[0].tagName == "DIV") {
                            //Is Parent CheckBox
                            var childDiv = table.next();
                            var isChecked = $(this).is(":checked");
                            $("input[type=checkbox]", childDiv).each(function () {
                                if (isChecked) {
                                    $(this).attr("checked", "checked");
                                } else {
                                    $(this).removeAttr("checked");
                                }
                            });
                        } else {
                            //Is Child CheckBox
                            var parentDIV = $(this).closest("DIV");
                            if ($("input[type=checkbox]", parentDIV).length == $("input[type=checkbox]:checked", parentDIV).length) {
                                $("input[type=checkbox]", parentDIV.prev()).attr("checked", "checked");
                            } else {
                                $("input[type=checkbox]", parentDIV.prev()).removeAttr("checked");
                            }
                        }
                    });

                }
</script>

//result


Change design Style of the ajax calender control



<style>
.cal_Calendar .ajax__calendar_title,
.cal_Calendar .ajax__calendar_next,
.cal_Calendar .ajax__calendar_prev  
 {
    color: #004080;
    padding-top: 3px;
}
 .cal_Calendar .ajax_calendar_invalid .ajax_calendar_day,
  /* Add class for your Invalid dates*/
  .ajax_calendar_invalid
  {
       color:red;  text-decoration:strike; cursor:pointer;
  }

</style>

//html

<ajax:CalendarExtender ID="CalendarExtender1" runat="server"
                  TargetControlID="txtSateDate"
                  PopupButtonID="imgSateDate"
           StartDate = "01/01/2012"

                  CssClass=".cal_Calendar" />

//result


Set A fixed date in Ajax Calendar Extender in asp.net using javascript




//HTML

<asp:TextBox runat="server" Width="105px" ID="TextBox1" ></asp:TextBox>
 <asp:CalendarExtender ID="CalendarExtender1" runat="server" PopupButtonID="dt_From"
                                    TargetControlID="dt_From" Enabled="True" Format="dd/MM/yyyy" BehaviorID="startdate"</asp:CalendarExtender>

<asp:TextBox runat="server" Width="105px" ID="TextBox2" ></asp:TextBox>
<asp:CalendarExtender ID="CalendarExtender2" runat="server" PopupButtonID="dt_To"
  BehaviorID="enddate" TargetControlID="dt_To" Enabled="True" Format="dd/MM/yyyy">
                                </asp:CalendarExtender>


//Script
<script>
function setdate() {

                    var dsd = new Date(2014, 03, 01); //fixed date
                    //start date of calender
                    dsd.setDate(dsd.getDate() + 1);   // add one day in fixed date
                    dsd.setDate(dsd.getDate() - 1);   // subtract one day in fixed date
                    //end date of calender control
                    var ded = new Date(2015, 02, 31);
                    ded.setDate(ded.getDate() + 1);
                    //CalendartxtBenFromb is behaviour id of the calender control
                    $find("startdate").set_startDate(dsd);
                    $find("enddate").set_startDate(dsd);
                    return false;

                }

</script>

//result


Tuesday, 3 February 2015

SQL Server r2 installation error . Update Visual Studio 2008 to SP1

There are more than one options to do this-

1. Go to like http://www.microsoft.com/en-us/download/details.aspx?id=10986 and download sp1 and installed it.

or Fallow the following steps to Install -

  1. Install Visual Studio 2008
  2. Install the service Package 1 (SP1)
  3. Install SQL Server 2008 r2

2. Go to ->>Start ->>runcommand ->>type - regedit ->> press enter

  1. windows+R type regedit and press enter


Step-2
Step-3


Step-4


Step-5


How to highlight selected text in notepad++

  –> To highlight a block of code in Notepad++, please do the following steps step-1  :- Select the required text. step-2  :- Right click...