Practical ASP. NET code snippets

Source: Internet
Author: User

1. open a new window and send parameters:

Transfer Parameters:

Response. write ("")

Receiving parameters:

String a = Request. QueryString ("id ");

String B = Request. QueryString ("id1 ");

2. Add dialog box for button

Button1.Attributes. Add ("onclick", "return confirm ('OK? ')");

Button. attributes. add ("onclick", "if (confirm ('Are you sure ...? ') {Return true;} else {return false ;}")

3. Delete selected table records

Int intEmpID = (int) MyDataGrid. DataKeys [e. Item. ItemIndex];

String deleteCmd = "DELETE from Employee where emp_id =" + intEmpID. ToString ()

4. Delete table record warning

5. Click the table row link to another page.

Related Article

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.