Implementation Code for ASP. NET to obtain the returned values of Stored Procedures

1. First, create a table (UserInfo ).Main field Id, uname, upass.2. Create a stored procedure with a returned valueCopy codeThe Code is as follows:Create proc proc_addUserInfo@ Uname varchar (50 ),@ Upass varchar (50 ),@ Returnc int

Use of asp.net DoDragDrop Method

The class library is defined:Copy codeThe Code is as follows:[UIPermissionAttribute (SecurityAction. Demand, Clipboard = UIPermissionClipboard. OwnClipboard)]Public DragDropEffects DoDragDrop (Object data,DragDropEffects allowedEffects) The data

Copy the Click Event in IE and Firefox and submit it to the new window (asp.net)

Let's take a look at the code that simulates the click event:Copy codeThe Code is as follows: OK In fact, I trigger a click event on a page mainly to open a new window when submitting a form. Others tend to ignore some basic knowledge, In fact,

Implementation Code of JSON returned by ASP. NET or WebService

Sample Code download: http://zsharedcode.googlecode.com/files/JQueryElementDemo.rar The content in this article is as follows: * Preparation* General handler/ashx* Prepare WebService/asmx If you want to return JSON through ashx or asmx, You need to

Code for implementing a linq page in asp.net

LInq paginationCopy codeThe Code is as follows:TestDataContext dc = new testDataContext ();Public string GetPageNum (GridView GridViewName, int pagesize, IQueryable SQL){Int page;If (HttpContext. Current. Request. QueryString ["page"]! = Null)Page =

Automatically retrieve unprocessed exceptions in Global. cs

The following is a simple example:1) code that causes exceptionsCopy codeThe Code is as follows:Protected void button#click (object sender, EventArgs e){Int a = 5;Int B = 2;Int c;C = a/(B-2 );} 2) code in Global. csCopy codeThe Code is as

How to Use ajax. ajaxMethod in asp.net

The following requirements must be met when using AjaxMethod:1. If no ajax. dll file exists, download one first.2. Add ajax. dll to project reference: In Solution Explorer of VS, right-click the project name, click "add project reference", and Click

Disguise aspx pages as static html format implementation code

Add the Application_BeginRequest event to Global. asax:Copy codeThe Code is as follows:Protected void Application_BeginRequest (object sender, EventArgs e){String pathAndQuery = Request. Url. PathAndQuery. ToLower ();If (pathAndQuery. IndexOf (".

Solution to bind TextBox carriage return event in asp.net

1. Bind the carriage return events on the page to the buttons.Copy codeThe Code is as follows:Function EnterTextBox (e){Var msie = (document. all )? True: false;Var keycode;If (! Msie) keycode = window. event? E. keyCode: e. which;Else keycode = e.

Introduction to extensions in ASP. NET

1.Global. asax Files are the centers of ASP. NET applications. It provides numerous events to process different application-level tasks, such as user authentication, application startup, and user session processing. You should be familiar with this

How to encrypt Config in asp.net

Copy codeThe Code is as follows: In asp. in net2.0, the web. you can use RSAProtectedConfigurationProvider and DPAPIProtectedConfigurationProvider to encrypt some data in config. This document describes how to use RSAProtectedConfigurationProvidert

Use DataReader in asp.net for efficient Paging

Share the paging code of the two methods1. Use DataReader for pagingCopy codeThe Code is as follows:/// /// PageList for DataReader/// /// /// /// /// /// /// /// /// Public DataTable PageListReader (string connectionString, string SQL, int

Solution to unavailability of ASP. NET in IIS7 Context

It takes several months for Johnny to change to Windows 7, but the system was reinstalled a few days ago and Windows 7 is still used, the error is as follows:The request is unavailable in this contextNote: An unhandled exception occurs during the

How to handle eurl. axd Http Error generated by ASP. NET

ASP. NET 2.0 and ASP. NET 4.0, the website program may encounter the following error: "System. web. httpException: path' // eurl. axd/'was not found."The error occurs when ASP. NET detects that the Web site is configured to use ASP. NET 4.0, local

How to Use DetailsView in asp.net

Aspx page:Copy codeThe Code is as follows:Width = "500px" OnModeChanging = "DetailsView1_ModeChanging" OnItemDeleting = "DetailsView1_ItemDeleting"OnItemUpdating = "DetailsView1_ItemUpdating" OnItemInserting = "DetailsView1_ItemInserting"> 'runat = "

Asp.net (vb.net) function for obtaining real IP addresses

The function for aspx vb.net to obtain the real IP address is as follows:Copy codeThe Code is as follows: Complete Test page:Copy codeThe Code is as follows: Untitled Page Dim client_ip As String = get_cli_ip ()System. Web. HttpContext. Current.

Asp.net code for obtaining the currency exchange rate of a bank

Copy codeThe Code is as follows:Class ExchangeRate{Private const string _ BASEURL = "webpage address ";Public const string CURRENCYCODE = "currency type separated by '|'"; // currency typePublic Hashtable GetValues (){Hashtable htReturn = new

& Quot; PageMethods is not defined & quot; or & quot; the object does not support this attribute or method &

1. Check whether the code supporting asp.net ajax is added to web. config.2. Check whether EnableMethods = true is set in ScriptManager.3. Check whether the namespace System. Web. Services referenced in the backend cs is added or the [System. Web.

Unicode Chinese transcoding Function Code

I really don't know about TX. the user name encoding actually returns different values. For example, "Lei 52D", there are two types of returned values? Lei? 52D and % 01% u96F7 % u78CA % 0152D. Quite depressing. Fortunately, there is still a Chinese

Use HttpHandler in asp.net to implement image anti-leech Protection

Copy codeThe Code is as follows:# Region IHttpHandler MemberBool IHttpHandler. IsReusable{Get {return true ;}}Void IHttpHandler. ProcessRequest (HttpContext context){String FileName = context. Server. MapPath (context. Request. FilePath );If

Total Pages: 1075 1 .... 517 518 519 520 521 .... 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.