开发者

Get Request.Form.Item by matching Request.Form.Key

开发者 https://www.devze.com 2023-01-06 09:37 出处:网络
My Request.Form keys are all prefixed with ctl00$container name$ and then the key I want. How can I get the regular key name working?

My Request.Form keys are all prefixed with ctl00$container name$ and then the key I want. How can I get the regular key name working?

Visual example from the immediate window:

I want to use:

? request.Form.Item("stationIdea")

but it won't work because the key is:

ctl00$content_innovation_body$stationIdea

as retrieved by

? request.F开发者_如何转开发orm.Keys("4")

so only this works:

? request.Form("ctl00$content_innovation_body$stationIdea")


request.Form(stationIdea.UniqueID)

The UniqueID property will return the id you are looking for. Another property you may be interested in is ClientID which can be useful for using the id in javascript.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号