tag:blogger.com,1999:blog-38269867162345137132024-03-14T12:59:19.561+05:30Csharp Asp.Net Articles C# VB Tutorials Code Examples SamplesASP.NET,C#,VB,SharePoint,AJAX,SQL, GridView,jQuery,MVC,WCF,WPFAnonymoushttp://www.blogger.com/profile/10629107305544485629noreply@blogger.comBlogger218125tag:blogger.com,1999:blog-3826986716234513713.post-91110080589086464072015-01-06T17:52:00.002+05:302015-01-06T17:52:52.402+05:30DropDownList Validation Using JQuery JavaScript In Asp.Net
This post explains DropDownList validation Using Jquery and JavaScript in Asp.Net where DropDown is either bind with SqlDataSource or listItems.
Place one drop down and button on the page in design view and add JQuery javascript file in solution and add it's reference in head section of page.
write following JQuery script in head section of page.
1: <head runat="server">
2:Anonymoushttp://www.blogger.com/profile/10629107305544485629noreply@blogger.com0tag:blogger.com,1999:blog-3826986716234513713.post-10237196090503160772015-01-05T16:34:00.000+05:302015-01-05T16:34:26.484+05:30Validate DropDownList Using Required Field Validator Asp.Net
This post explains How to Validate DropDownList Using RequiredFieldValidator In Asp.Net when either Dropdown is populated using SqlDataSource or when Drop Down is populated using List Items.
Place one dropdown list, button and requiredfieldvalidator controls in design view of page and add list items in HTML source of page as mentioned below.
1: <asp:DropDownList ID="ddlLanguage" runat="Anonymoushttp://www.blogger.com/profile/10629107305544485629noreply@blogger.com0tag:blogger.com,1999:blog-3826986716234513713.post-7542333639805706892014-12-29T16:04:00.000+05:302014-12-29T16:19:25.201+05:30ASP.NET TextBox Remaining Character Counter JavaScript
This example illustrate how to count and show remaining characters in TextBox using JavaScript in Asp.Net.
Create a new website in Visual Studio and place one TextBox and Label on the default.aspx page in design mode.
Go to HTML source of page and write a JavaScript function named Count in head section of page to count remaining characters in TextBox.
Set the MaxLength property of TextBoxAnonymoushttp://www.blogger.com/profile/10629107305544485629noreply@blogger.com0tag:blogger.com,1999:blog-3826986716234513713.post-46029404516027729152012-09-06T17:43:00.000+05:302012-09-06T17:43:10.583+05:30Configure Unique Document IDs Feature In SharePoint 2010This post explains how to Enable Activate Or Configure Unique Document IDs Feature In SharePoint 2010 For better Document Management.
Open your site collection in browser and login with administrator account
Click on Site Actions > Site Settings
Select Site collection features from Site Collection Administration section
Activate Document ID Service
After activation it will lookAnonymoushttp://www.blogger.com/profile/10629107305544485629noreply@blogger.com0tag:blogger.com,1999:blog-3826986716234513713.post-16706837514535671822012-08-24T14:58:00.000+05:302012-08-24T14:58:04.662+05:30Asp.Net Bind Populate DropDownList With JQuery And XMLIn this example i'm explaining How To Populate Or Bind DropDownList With JQuery And XML In Asp.Net.
Add jquery library reference in head section and place one dropdown on the page.
Add one list item with select as it's value.
1: <asp:DropDownList ID="DropDownList1" runat="server">
2: <asp:ListItem>Select</asp:ListItem>
3: </asp:DropDownList>
4:
Anonymoushttp://www.blogger.com/profile/10629107305544485629noreply@blogger.com1tag:blogger.com,1999:blog-3826986716234513713.post-70896386915889935302012-08-17T15:58:00.000+05:302012-08-17T15:59:25.224+05:30AjaxFileUpload AsyncFileUpload In ModalPopUp Extender Asp.NetThis example shows how to use AjaxFileUpload Control Or AsyncFileUpload In ModalPopUp Extender Using C# VB Asp.Net.
Place ToolkitScriptManager and a button inside UpdatePanel on the page, we will open ModalPopup in click event of this button to upload files.
Create one panel on the page and add AjaxFileUpload or Ajax AsyncFileUpload in it.
HTML Source
<asp:ToolkitScriptManager ID="Anonymoushttp://www.blogger.com/profile/10629107305544485629noreply@blogger.com0tag:blogger.com,1999:blog-3826986716234513713.post-53357468748182485482012-08-17T13:23:00.000+05:302012-08-17T13:23:13.504+05:30Allow Enable Anonymous Access In SharePoint 2010 SitesThis Post explains How To Allow Or Enable Anonymous Access In SharePoint 2010 Sites Collections.
1. Open SharePoint 2010 Central Administration, Go to Manage Web Applications
Select Your Site and click on Authentication Providers icon in the top ribbon bar
Click on Default Zone and Check the Enable Anonymous Access CheckBox and save it
2. Select your site and click on Anonymous Anonymoushttp://www.blogger.com/profile/10629107305544485629noreply@blogger.com0tag:blogger.com,1999:blog-3826986716234513713.post-41701074791513855702012-08-16T11:17:00.000+05:302012-08-16T11:17:08.565+05:30Ajax AutoCompleteExtender In Master Page Asp.NetThis Example shows How To Use Ajax AutoCompleteExtender TextBox In Master Page In Asp.Net.
Open Visual Studio and create new website, add master page in it and design it as you want.
Create a BIN folder in application and add AjaxControlToolkit.dll in it.
I have use Northwind database to fetch names for AutoCompletion list.
Add Connection String in web.config file
<connectionStrings>
<Anonymoushttp://www.blogger.com/profile/10629107305544485629noreply@blogger.com4tag:blogger.com,1999:blog-3826986716234513713.post-20794807571788045622012-08-14T18:54:00.003+05:302012-08-14T18:54:50.063+05:30Validation Of ViewState MAC Failed Error Asp.NetIf you are receiving Validation Of ViewState MAC Failed Error In Asp.Net web application. This occurs if you are using controls like Gridview or Detailsview with DataKeyNames on the page and page takes long time in loading.
This issue has been fixed in .Net framework 2.0 SP2 and .Net framework 3.5 SP1. so upgrading to service packs is best option to fix validation of viewstate mac failed error.
Anonymoushttp://www.blogger.com/profile/10629107305544485629noreply@blogger.com1tag:blogger.com,1999:blog-3826986716234513713.post-35256207400819171232012-08-14T14:04:00.000+05:302012-08-17T13:28:36.384+05:30Custom Login Web Part In SharePoint 2010 Forms BasedThis post explains How To Create Custom Login Web Part In SharePoint 2010 For Forms Based Authentication FBA.
Before creating Login WebPart we need to setup and configure Membership Provider Database and Forms Based Authentication(FBA) In SharePoint 2010 and can optionally Allow Anonymous Access to sharepoint web application and sites collection.
1. Create Visual Web Part In Visual Studio 2010
Anonymoushttp://www.blogger.com/profile/10629107305544485629noreply@blogger.com5tag:blogger.com,1999:blog-3826986716234513713.post-36053054627076950882012-08-13T11:01:00.000+05:302012-08-13T11:02:42.895+05:30Asp.Net AjaxFileUpload Control With Drag Drop And Progress BarThis Example explains how to use AjaxFileUpload Control With Drag Drop And Progress Bar Functionality In Asp.Net 2.0 3.5 4.0 C# And VB.NET.
May 2012 release of AjaxControlToolkit includes a new AjaxFileUpload Control which supports Multiple File Upload, Progress Bar and Drag And Drop functionality.
These new features are supported by Google Chrome version 16+, Firefox 8+ , Safari 5+ Anonymoushttp://www.blogger.com/profile/10629107305544485629noreply@blogger.com7tag:blogger.com,1999:blog-3826986716234513713.post-65400707691468538612012-08-10T12:54:00.000+05:302012-08-10T12:56:33.220+05:30Ajax ConfirmButtonExtender With ModalPopUp In GridView Asp.NetThis example implements Ajax ConfirmButtonExtender With ModalPopUp Extender In Asp.Net GridView to show Delete Confirmation before deleting records.
Populate GridView using SqlDataSource and add one LinkButton inside TemplateField in Columns.
1: <asp:TemplateField HeaderText="Delete">
2: <ItemTemplate>
3: <asp:LinkButton ID="lnkDel" runat="server"
4:Anonymoushttp://www.blogger.com/profile/10629107305544485629noreply@blogger.com0tag:blogger.com,1999:blog-3826986716234513713.post-54318625472596931112012-08-09T12:17:00.000+05:302012-08-09T12:17:32.316+05:30Populate Bind DropDownList From XML File In Asp.NetThis Example explains how to Populate Or Bind DropDownList With XML File Data In Asp.Net In 3/n Tier Architecture Using C# And VB.
Place one DropdownList on the page.
<asp:DropDownList ID="DropDownList1"
runat="server"
onselectedindexchanged
="DropDownList1_SelectedIndexChanged">
XML Data Can be in various formats, i'll use 3 different ones shown Anonymoushttp://www.blogger.com/profile/10629107305544485629noreply@blogger.com1tag:blogger.com,1999:blog-3826986716234513713.post-46045756587081848962012-08-08T11:27:00.003+05:302012-08-08T11:27:57.729+05:30Auto Refresh Update GridView In Asp.Net Ajax With TimerThis Example describes How To Auto Refresh Or Update GridView Automatically At Regular Interval In Asp.Net Using Ajax And Timer.
Add GridView And Timer control inside UpdatePanel on the page and set Interval property to desired value in miliseconds. I have set it to 5000 (5 Seconds).
HTML SOURCE
1: <asp:ScriptManager ID="ScriptManager1" runat="server"/>
2: <asp:UpdatePanel ID="Anonymoushttp://www.blogger.com/profile/10629107305544485629noreply@blogger.com2tag:blogger.com,1999:blog-3826986716234513713.post-75482595234024027202012-08-08T00:16:00.000+05:302012-08-14T15:31:52.394+05:30SharePoint 2010 Custom Login Page For FBAThis post explains How To Create Custom Login Page In SharePoint 2010 For Forms Based Authentication FBA.
Open Visual Studio 2010 and click on File > New Project
Select SharePoint 2010 from installed templates in left pane and select Empty SharePoint Project
Name this project CustomLogin
In the next window of SharePoint Customization Wizard, select the sharepoint site you Anonymoushttp://www.blogger.com/profile/10629107305544485629noreply@blogger.com0tag:blogger.com,1999:blog-3826986716234513713.post-45024214153257893552012-08-02T19:01:00.000+05:302012-08-02T19:09:59.635+05:30Select GridView Row Without Postback OnClick Of Cell JavaScriptThis Example explains how to Select GridView Row On Click Of Cell Programmatically Without Postback Using JavaScript In Asp.Net.
We can make cells clickable by adding OnClick attribute in ClientScript.
Place ScriptManager And UpdatePanel on the page and add Gridview inside ContentTemaplate for partial postbacks, Populate it using SqlDataSource.
HTML SOURCE OF GRIDVIEW
1: <asp:Anonymoushttp://www.blogger.com/profile/10629107305544485629noreply@blogger.com0tag:blogger.com,1999:blog-3826986716234513713.post-17078788577210548272012-08-02T14:57:00.003+05:302012-08-14T15:30:35.738+05:30Forms Based Authentication FBA In SharePoint 2010 ClaimsThis post explains How To Configure Forms Based Authentication FBA In SharePoint Server 2010 For Claims Based Web Applications Using IIS Server.
If you follow this example step by step, you will be able to setup mixed mode authentication with windows and Claims based or Forms Based Authentication in SharePoint Server 2010 without any errors.
1. Create Membership Provider DataBase In SQL Server Anonymoushttp://www.blogger.com/profile/10629107305544485629noreply@blogger.com4tag:blogger.com,1999:blog-3826986716234513713.post-52504807853519660892012-07-30T12:19:00.000+05:302012-08-01T14:36:59.111+05:30Asynchronous Multiple File Upload With JQuery Uploadify Asp.NetThis post shows how to use Multiple Asynchronous FileUpload With JQuery Uploadify Example In Asp.Net To Upload Files Asynchronously In Gmail Style With Progress Bar In Asp.Net C# and VB.
Download Latest JQuery Library And Uploadify Plugin.
Create a folder in application and add swf,css and js files in it from links above.
Open HTML source and add reference to these javascripts in head section.
Anonymoushttp://www.blogger.com/profile/10629107305544485629noreply@blogger.com3tag:blogger.com,1999:blog-3826986716234513713.post-65002756646820891352012-07-26T13:24:00.001+05:302012-07-26T13:24:56.653+05:30Avoid Prevent Session TimeOut In Asp.Net To Keep Session AliveHere i'm explaining How To Avoid Prevent Session TimeOut expiration In Asp.Net 2.0,3,5,4.0 to Keep Session Alive.
We can set timeout value in web.config file using Forms Authentication as mentioned below, Default value is 20 minutes.
This value gets reset or slide if there are calls between client and server and session expiration occurs if idle or no postbacks for specified time.
<Anonymoushttp://www.blogger.com/profile/10629107305544485629noreply@blogger.com0tag:blogger.com,1999:blog-3826986716234513713.post-72442593605658363102012-07-23T13:30:00.000+05:302012-08-11T18:31:45.657+05:30Cascading ComboBox In Winforms Windows Forms C# VB.NETThis example explains How To Create Cascading ComboBox Dependent On One Another In WinForms Windows Forms Applications Using C# And VB.Net.
I have used Country, State, City tables from database to populate respective cascading combobox based on selection of country and state.
Drag 3 combobox controls from toolbar on the windows form, write following code to populate comboboxes.
Table schemas areAnonymoushttp://www.blogger.com/profile/10629107305544485629noreply@blogger.com2tag:blogger.com,1999:blog-3826986716234513713.post-28291274859886334082012-07-21T15:02:00.000+05:302012-07-21T15:02:06.308+05:30GridView Articles In Asp.Net 2.0 3.5 4.0Below is the list of some GridView Articles In Asp.Net 2.0 3.5 and 4.0, Which i have complied from some of the earlier posts related to GridView at one place.
1. Insert Update Edit Delete Rows Record In GridView
How To Insert Update Edit Delete Records With SqlDataSource Using C# VB.NET Asp.Net.
2.Drag Drop GridView Rows With JQuery
How To Implement Drag And Drop Functionality Using JQuery Anonymoushttp://www.blogger.com/profile/10629107305544485629noreply@blogger.com0tag:blogger.com,1999:blog-3826986716234513713.post-8301366720428548332012-07-21T13:16:00.002+05:302012-08-14T15:28:40.895+05:30Sys Is Undefined Error In Asp.Net Ajax Or SharePointIf you are getting Sys Is Undefined Error In Asp.Net Ajax Or SharePoint 2010 Applications, cause of error might be use of Sys namespace or reference in JavaScript placed in head section of page.
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(SetLabelValue);
function SetLabelValue(sender, e) {
document.getElementById("lblMessageText").innerHTML = "Thanks for Anonymoushttp://www.blogger.com/profile/10629107305544485629noreply@blogger.com0tag:blogger.com,1999:blog-3826986716234513713.post-15964800065336828572012-07-20T13:21:00.002+05:302012-07-20T13:21:51.478+05:30Publish Deploy Asp.Net WebSite Application On IIS7 ServerThis post explains how to Publish And Deploy Asp.Net Web Site Application On IIS7 Server.
Open Application in Visual Studio, Click on Build > Publish Web Site.
Browse to where you want to save published DLLs,Files and other aspx pages. (TestWebSite)
Copy TestWebSite folder inside C:\inetpub/wwwroot directory.
Click on Start Menu > Run > INETMGR to open IIS manager.
Click on Anonymoushttp://www.blogger.com/profile/10629107305544485629noreply@blogger.com2tag:blogger.com,1999:blog-3826986716234513713.post-40191276790379842992012-07-19T12:29:00.002+05:302012-07-19T12:35:42.405+05:30UpdateProgress Control Example In Asp.NetThis example shows How To Use UpdateProgress Control In Asp.Net with ProgressTemplate.
Update Progress can be used to display a animated GIF image or wait message using CSS while page is fetching or loading data.
I am displaying records in gridview in click event of button and processing message is displayed while data is retrieved.
Place ScriptManager on page and put Button,GridView,Anonymoushttp://www.blogger.com/profile/10629107305544485629noreply@blogger.com2tag:blogger.com,1999:blog-3826986716234513713.post-44937199551597472852012-07-18T14:43:00.000+05:302012-07-18T14:44:20.773+05:30Move Copy Table From One DataBase To Another In SQL ServerSeveral Times We need to know How To Move Or Copy SqlServer Database Table Schema And Data From One DataBase to Another In Sql Server We can do it in following ways.
Method 1.
Open Sql Server management studio
Right Click on Database name > Tasks > Export Data.
Provide login credentials and Select Database
In next screen select database where table is to be copied
Copy data from one or moreAnonymoushttp://www.blogger.com/profile/10629107305544485629noreply@blogger.com0