ASP. NET experience

Source: Internet
Author: User

Asp.net URL: the ultimate solution for passing Chinese Parameters


Custom dialog box control bate2

Gridview 72


Implementation and Analysis of ASP. NET 2.0 client callback

After JavaScript calls C #,CodeProcess and ASP. NET call JS garbled solution 
Http://blog.csdn.net/fanweiwei/archive/2006/10/18/1339365.aspx

++ First case:

1 . Background method:

Protected   String Csharpvoid ( String Strcc)
{

 ReturnStrcc;

}

2 . Javascript call
< Script Language = " Javascript " >

VaR s =   " <% = Csharpvoid ( " Www.esoutong.com " ) %> " ;
Document. Write (s );

</ Script >

 


++ Case 2:

1 . Post code:
Protected   Void Csharpvoid ()
{
StringStrcc= "Www.esoutong.com";
Response. Write (strcc );

}

2 . Call method: csharpvoid ()

< Script Language = " Javascript " >
Document. Write ( " <% Csharpvoid (); %> " );
</ Script >


You can place a button on the page to set it to an invisible style. = " Display: None " Then, use the script to make this button click
Document. All ( " Button1 " ). Click ();
Write the Event code in the C # background of the button. This is the simplest script to call the C # method.

Creating a Tabbed interface for displaying parent/child data
Uploading files in ASP. NET 2.0
Upload multiple files using the htmlinputfile Control
File Uploading to access database using ASP. NET (VB)
File Upload with ASP. NET

When showmodaldialog Opens An ASPX page, if the page has been opened once before, the page in the cache will be automatically loaded without displaying the latest data.

There are two solutions:

(1) When opening the modal box, add a random parameter to the URL to avoid page caching:

Code var url = 'editflownode. aspx? Flowid = 0 & id = 2 & X = '+ math. Random ();
VaR result = Window. showmodaldialog (URL, '', 'status: No; help: No ;');

(2) In the page_load method of the Asp.net page, set not to cache:

Program Code protected void page_load (Object sender, eventargs e ){
Response. expires = 0;
Response. cache. setnostore ();
Response. appendheader ("Pragma", "No-Cache ");
}

ASP pop-up window Summary

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.