Browse by Tags

All Tags » .NET Faq (RSS)
Sorry, but there are no more tags available to filter with.

How To: Hide close button for Windows Form

Several times there is a requirement to hide/disable the close button and to close the Form with a button on the Form to exit the application. To hide the Close Button on the form we can set ControlBox propertyof the Form to False (by default its set...
Posted by SushilaSB | 9 comment(s)
Filed under:

How To: Get Selected Date from MonthCalendar control

VB.NET Private Sub MonthCalendar1_DateChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.DateRangeEventArgs) Handles MonthCalendar1.DateChanged 'Display the dates for selected range Label1.Text = "Dates Selected from :" &...
Posted by SushilaSB | 2 comment(s)
Filed under:

How To: Get the foldername in which the file resides

We come across situation many a times where we need the name of the folder in which the file resides. Let's say the folder is as "C:\Project1\CSProj1\somename\file1.cs" We need to get the folder "somename" We can do this by using...
Posted by SushilaSB | 1 comment(s)
Filed under:

How To: Extract numbers from string

VB.NET Shared Function ExtractNumbers( ByVal expr As String ) As String Return String.Join( Nothing, System.Text.RegularExpressions.Regex.Split( expr, "[^\d]" ) ) End Function C# static string ExtractNumbers( string expr ) { return string.Join...
Posted by SushilaSB | 7 comment(s)
Filed under:

How To: Open a pop-up window using dropdownlist

To open pop-up window using <asp:dropdownlist..> VB.NET Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Response.Write("<script>window.open('" + DropDownList1.SelectedValue + "'...
Posted by SushilaSB | 6 comment(s)
Filed under:

How To: Customize Calendar Control to limit the users to select day on or after today

In this Sample code we will see how to customize calendar control to limit the user to select the day on or after today Step 1: Drag Drop Calendar Control <asp:Calendar id="Calendar1" runat="server"></asp:Calendar> Step 2: In code behind use...
Posted by SushilaSB | 2 comment(s)
Filed under:

ASP.NET Faq on Syncfusion Website

Check out ASP.NET Faq on Syncfusion website.
Posted by SushilaSB | 1 comment(s)
Filed under:

How To: Troubleshoot Microsoft.Net Framework installation issues

When Microsoft Windows Installer is incorrectly registered in the Windows registry, the .NET Framework version Setup program cannot gain access to some Windows Installer components. The below articles discuss how to work around this issue by unregistering...
Posted by SushilaSB | 1 comment(s)
Filed under:

Validation Controls not working on Firefox

The ASP.Net validations controls only work client side in IE. You can make them work in other browsers, coding as below: C# Page.Validate(); if ( !Page.IsValid ) { return ; } //Continue Your code VB.NET Page.Validate() If Not Page.IsValid Then Return...
Posted by SushilaSB | 14 comment(s)
Filed under:

Sample Code: How to use a RangeValidator to Select Colors from a specific range

<asp:dropdownlist id="DropDownList1" runat="server"> <asp:ListItem Value ="#000000">#000000</asp:ListItem> <asp:ListItem Value ="#ff0000">#ff0000</asp:ListItem> <asp:ListItem Value ="#0000ff">#0000ff</asp:ListItem>...
Posted by SushilaSB | 1 comment(s)
Filed under:
More Posts Next page »