ASP. net2.0 gridview URL-based Chinese parameter transfer solution

Source: Internet
Author: User

 

  < ASP: gridview ID = " Gridview1 " Pagesize = " 30 " Runat = " Server " Height = " 100% " Width = " 100% " Autogeneratecolumns = " False " Allowpaging = " True " Emptydatatext = " No data records !! " Datakeynames = " Iproductbigsort_id " Backcolor = " # Eeeee6 " Onrowediting = " Gridviewappsrowediting " Onrowcancelingedit = " Gridview1_rowcancelingedit " Onrowdeleting = " Gridview1_rowdeleting " Onrowupdating = " Gridview1_rowupdating "   >
< Columns >  
< ASP: templatefield headertext = " Primary category name " >
< Itemtemplate > <% # Eval ( " Sproductbigsort " ) %> </ Itemtemplate >
< Edititemtemplate > < ASP: textbox ID = " Sproductbigsort " Width = " 60% " Runat = " Server " Text =   <% # Eval ( " Sproductbigsort " ) %>   /> </ Edititemtemplate >
</ ASP: templatefield >
< ASP: templatefield headertext = " Manage subcategories " >
< Itemtemplate >
< A href = " Admin_smallsort.aspx? Iproductbigsort_id = <% # eval ( " Iproductbigsort_id " ) %> & Sproductbigsort = <% # server. urlencode (eval ( " Sproductbigsort " ). Tostring () %> " > View category </ A >
</ Itemtemplate >
</ ASP: templatefield >
< ASP: commandfield showeditbutton = " True " Headertext = " Operation " Buttontype = " Button " />
< ASP: templatefield headertext = " Delete category " Showheader = " False " >
< Itemtemplate >
< ASP: linkbutton ID = " Linkbutton1 " Runat = " Server " Causesvalidation = " False " Commandname = " Delete " Text = " Delete " Onclientclick = " Return confirm ('serious warning !! This operation is very dangerous !! \ N this operation will delete the following information: \ n level 2 and level 3 sub-categories under this primary category, related brands, and all related product materials. \ N are you sure you want to delete it? '); " > </ ASP: linkbutton >
</ Itemtemplate >
</ ASP: templatefield >
</ Columns >
< Pagersettings visible = " False "   />
</ ASP: gridview >


// This enables encoding when the URL parameter is passed in the template column of the gridview.
/**/ /*
A href = "admin_smallsort.aspx? Iproductbigsort_id = <% # eval ("iproductbigsort_id") %> & sproductbigsort = <% # server. urlencode (eval ("sproductbigsort "). tostring () %> "> View Category </a>
*/



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.