Search This Blog

Wednesday, November 19, 2014

Telerik RadTimePicker Get Selected Time

Telerik > RadTimePicker > Get Time


Get selected time from RadTimePicker c#.


DateTime dt = radTimePicker.SelectedDate.Value;
string time = dt.ToString("HH:mm:ss");






Monday, November 17, 2014

Call one constructor from another c#

CKeywords > ThisCall one constructor from another 



      public Constructor1()
      {
      }

      public Constructor2(string writer) : this()
      {
      }









Thursday, November 6, 2014

Lambda Expressions in a Query C#

C# > Operators > Lambda > Query

We use  lambda expressions in method calls not directly in query syntax.

Simple Example

     int[] wages = { 1000, 1200, 1500, 1800, 2000, 2500 };
    int highWagesCount = wages.Where(n => n >= 2000).Count(); 









Wednesday, November 5, 2014

DataGridView Windows Forms Control

Windows Forms >  DataGridView Control

You can use a DataGridView control to display data with or without an underlying data source. 
DataGridView contains cells, rows, columns, and borders.
Without specifying a data source, you can create columns and rows that contain data and add them directly to the DataGridView using the Rows and Columns properties. 






HyperLink ASP.NET Example

ASP.NET > System.WebWeb Controls > HyperLink

Displays a link to another Web page.

Events



Example

<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/WebForm1.aspx">HyperLink</asp:HyperLink>




Web Controls ASP.NET

ASP.NET > System.Web > Web Controls

Web server controls run on the server.









ASP.NET Hyperlink OnClick Code Behind

ASP.NET > System.Web > Web Controls > > onClick

Script

<script br="" gt="" language="javascript" type="text/javascript">

function onClick(obj) {

}
lgt;/script>

C# Code behind

HyperLink1.Attributes.Add("onclick", "return onClick(this)");