Business Logic> data layer> sqldatasource> SQL input parameters

Source: Internet
Author: User

First, the source of the input parameters:

 

Parameter type Description

Controlparameter

Set the parameter to the attribute value of the control in the ASP. NET webpage. Use the controlid attribute to specifyControl. UseControlparameterThe propertyname attribute of the object specifies the name of the attribute that provides the parameter value.

SlaveControlSome controls that are derived will define controlvaluepropertyattribute to determine the default attribute from which to retrieve the control value. As long as no explicit settingsPropertynameThe default attribute is used.ControlvaluepropertyattributeApply to the following control properties:

  • System. Web. UI. webcontrols. Calendar. selecteddate

  • System. Web. UI. webcontrols. checkbox. Checked

  • System. Web. UI. webcontrols. detailsview. selectedvalue

  • System. Web. UI. webcontrols. fileupload. filebytes

  • System. Web. UI. webcontrols. gridview. selectedvalue

  • System. Web. UI. webcontrols. Label. Text

  • System. Web. UI. webcontrols. textbox. Text

  • System. Web. UI. webcontrols. Treeview. selectedvalue

Cookieparameter

Set the parameter to the value of the httpcookie object. Use the cookiename attribute to specifyHttpcookieObject Name. If the specifiedHttpcookieIf the object does not existDefaultvalueThe attribute value is used as the parameter value.

Note:

Only single-value cookies are supported.

Formparameter

Set the parameter to the value of the HTML form field. Use the formfield attribute to specify the name of the HTML form field. If the specified HTML form field value does not exist,DefaultvalueThe attribute value is used as the parameter value.

Profileparameter

Set the parameter to the attribute value in the current user profile. Use the propertyname attribute to specify the name of the configuration file attribute. If the specified configuration file property does not existDefaultvalueThe attribute value is used as the parameter value.

For information about user configuration files, see ASP. NET configuration file attributes.

Querystringparameter

Set the parameterQuerystringField Value. Use the querystringfield attribute to specifyQuerystringField name. If the specifiedQuerystringIf the field does not existDefaultvalueThe attribute value is used as the parameter value.

Sessionparameter

Set the parameter to the value of the session object. Use the sessionfield attribute to specifySessionObject Name. If the specifiedSessionIf the object does not existDefaultvalueThe attribute value is used as the parameter value.

 

Add a custom parameter source, that is, usePropertyObject.

 

Next, I will make a small adaptation of the example of ASP. Net 3.5 Development Based on C # to explain how to use the above parameters.

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.