How to export able to Excel in Asp.net

Copy codeThe Code is as follows:# Region DataTable export to Excel/// /// DataTable export data to Excel/// /// DataTable /// export file name /// export the title to | split Public static void DataTableExcel (System. Data. DataTable pData,

Application Analysis of RDLC cyclic data processing in. NET

When using RDLC to develop reports, if the data source content is as follows.Copy codeThe Code is as follows:Private List CreateDataSet (){List userDataSet = new List ();UserDataSet. Add (new UserData () {Name = "Clark", Age = 18 });UserDataSet.

Click the submit button and the value of DropDownList changes to the default value for analysis.

After you click the submit button, all the control values bound to the database on the page are restored to the default value.The reason is to write the binding function loadData () inIf (! IsPostBack){Your binding function;}Otherwise, the page is

Benefits and methods of asp.net url rewriting

Benefits of url rewriting: 1. Easy to search by the search engine (html-format website search engines have the highest priority, and seo optimization is better) 2. the url is simpler and easier to remember. 3. Hide the actual website path strength

ASP. NET notes-line command processing and paging details

1. Line command processing (1. Background code: operation line // If this function operation is from the html responseIf (e. CommandName = "addAge "){// Obtain the row numberInt index = (ListViewDataItem) e. Item) DispalyIndex;// Obtain the primary

ASP. NET note-using AD controls

How to use ad controls: An ad file is an XML file. All the tag attributes in the ad file are analyzed and placed in the adProperties dictionary for Attribute editing. Ads. xmlCopy codeThe Code is as follows: 4rwbgzby.gif Http://www.jb51.net Text_01

Example code for Ajax to implement the top and top features in comments

The effect is roughly as follows: Javascript uses jquery. Create an Asp.net web project and use NuGet to obtain the latest Jquery version. The database uses Nhibernate and the Install-Package Nhibernate reference. The database uses PostgreSQL.

PerCallContextLifeTimeManager Based on the custom Unity survival Model

PerThreadLifetimeManager ProblemsWhen the built-in PerThreadLifetimeManager survival model of Unity is used, it is designed based on ThreadStatic TLS (Thread Local Storage). That is to say, for each managed ManagedThreadId, it caches the generated

Asp.net prompts information in iframe and executes the jump question

Copy codeThe Code is as follows:/// /// In iframe, pop up the information and jump/// /// /// Public static void ResponseShowMsg (string msg, string targetPageName){String str = " ";String Urls = HttpContext. Current. Request. Url.

Implementation of Asp.net anti-repeated submission mechanism

Add the following two attributes to the Button or other controls.1. UseSubmitBehavior = "false" uses the server-side commit mechanism to execute the OnClick event.2. After the OnClientClick client clicks the button, set the control to unavailable,

Asp.net maintains the position of the page scroll bar (unchanged after the page is submitted)

In general, many people use pages to control browser scroll bars. smartNavigation = False. For the scroll bar control of DIV in the page, I wrote one after reading other people's code for reference only:Copy codeThe Code is as follows:Public Shared

C # How to Implement the get or set values of class attributes through Reflection

Recently, someone called Insus to learn about Reflection. Reflection provides encapsulated assembly, module, and Type objects (Type ). You can use reflection to dynamically create instances of the type, bind the type to an existing object, or obtain

Set the default Ajax operation cache and error

Copy codeThe Code is as follows:// Set the default settings for Ajax operations$. AjaxSetup ({Cache: false,Error: function (XMLHttpRequest, textStatus, errorThrown ){If (typeof (errorThrown )! = "Undefined ")$. Messager. alert (g_MsgBoxTitle, "An

More convenient and quick External Database Operations (Alternative method)

Copy codeThe Code is as follows:Using System;Using System. Data;Using System. Data. SqlClient;Public class Helper{Public static void Main (){// Connection stringString strcon = "server =.; database = blog; uid = sa; pwd = 1 ";SqlHelper helper = new

AjaxToolkit: CalendarExtender demo and implementation code

The date selection of Ajax CalenderExtender. The following shows the effect: Insus. NET uses ajaxToolkit: CalendarExtender to select a date. TextBox allows users to enter the data, or click the thumbnail on the right to display the ajaxToolkit:

ASP. NET simplified editing interface solution and implementation code

The user operation interface is simplified, and the addition function cannot be simplified. However, if the display, edit, update, and delete operations are performed in the GridView, the user is allowed to edit the settings. You need to click the

ASP. NET simplified editing interface solution and implementation code (2)

The program needs to be constantly improved. It is done in the morning. When you look at it again in the afternoon, you will feel that it is not perfect.For example: http://www.jb51.net/article/33563.htmchange "insus.net" to the following

Asp.net image file anti-Leech (respect for labor achievements) and BeginRequest event Learning

After all, image leeching is a successful task. Many people do not want others to steal images easily. This function is available in many forums, probably because there are too many leeching behaviors.The anti-leeching program is actually very

The value of two custom controls and the application of interfaces

"Two user controls are used in A. aspx page. The user control A has A button, and the textbox value in control B is obtained when you click it.Because the name will change during generation, how should I write the findcontrol name?In addition, are

Method and implementation code for obtaining row index of gridview (non-js Version)

Previous versions of http://www.jb51.net/article/33251.htmare the use of javascriptto obtain the line index of gridview.In this article, Insus. NET uses non-Javascript to obtain the row index of the GridView.The data is changed using the data from

Total Pages: 1075 1 .... 769 770 771 772 773 .... 1075 Go to: GO

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.