RobHi all,I''ve got myself into a bit of a problem and I''m trying to dig my way backout, in a) the quickest way due to project deadline and also b) bestapproach.I have a form which gets a set of document type properties from SQL Server,these properties are used to create corresponding controls on the form, sofor example:PropertyDisplayName : SurnamePropertyObjectName : txtSurnameIn this very small example the "Surname" text would be displayed on the leftof the text box which would have the ID of "txtSurname".There are currently 6 different document types - each with a set ofproperties, some of the properties are common in each document type (likesurname for example).My problem is that if my querystring does not contain the ''document type'' Idont know what type of form to give the user - therefore the form has a dropdown menu with all of the document types listed for them to select from -this only appears if the querystring value is missing, if it is present,then the drop down is replaced with a readonly text box with the name of thedocument type in it.What I need to do in the case of the querystring not containing a value forthe document type would be to change the controls on the form. This needsto be achieve without a reload of the page.Initially I was thinking that I could get all of the document types andassociated properties from the database in one go at the beginning, put eachdocument type into a seperate ''panel'' and then show/hide the relevantpanel - my only probelm with this (untested) is that I also have validationcontrols for each dynamically created control - the names for these are alsotaken from the database - ie txtSurname would have the first 3 charactersdropped and then have vld added - creating vldSurname, I can foresee if I godown this route 6 panels all sharing at least 1 control which is the same(lets say surname) - and therefore having 6 txtSuranmes and 6 vldSurnames -surely this will cause some form of problem as the names wont be unique.My next thought was perhaps to create the one display with all of theproperties on it regardless of which document type they belong to and setthem all to visible = false at the start - then if they are needed by thedocument type change their visible status to true. My question here iswhether or not if you set a control to visible = false whether it still getssubmitted when the form is submitted?Any information or suggestions on this would be appreciated - if I had moretime for this I may go back and change somethings which may remove thisissue - however time has nearly run out so I need a ''best solution for now''kinda approach.RegardsRob推荐答案" Rob Meade" < RO ********** @ NOSPAMubht.swest.nhs.uk>在消息中写道 新闻:OC ************* @ TK2MSFTNGP12.phx.gbl ..."Rob Meade" <ro**********@NOSPAMubht.swest.nhs.uk> wrote in messagenews:OC*************@TK2MSFTNGP12.phx.gbl...任何信息或者对此的建议将不胜感激 - 如果我有更多的时间用于此,我可以回去改变一些可能会消除这个问题的事情 - 但是时间已经快结束所以我需要''最佳解决方案现在''有点接近。 Any information or suggestions on this would be appreciated - if I hadmore time for this I may go back and change somethings which may remove this issue - however time has nearly run out so I need a ''best solution fornow'' kinda approach. 这些天不太时髦,但你可能能够实现你的目标 想要一个FRAMESET。Not very fashionable these days, but you might be able to achieve what youwant with a FRAMESET." Mark Rae"写道...... 嗨马克 - 谢谢你的回复。"Mark Rae" wrote ...Hi Mark - thanks for your reply.这些天不太流行, 你的意思是''接近''? 但是你可以用FRAMESET达到你想要的效果。 Not very fashionable these days,you mean the ''approach''? but you might be able to achieve what you want with a FRAMESET. 就像在HTML框架中一样......如果我开始在我的应用程序中使用框架 ,我就永远不会失望.... control.visible = false不是简单地从 渲染页面中删除控件吗? 问候 Robas in the HTML frameset...I''d never live it down if I started using frameswithin my applications....Would the control.visible = false not simply remove the control from therendered page?RegardsRob嗨马克,我只是重新阅读你会回复的内容 - 比如我......我看到了你的内容 是现在说 - 也就是说,Framesets不是太时髦...... 大笑......需要更多的睡眠! :) RobHi Mark, I just re-read what you''d reply with - like duh me...I see what youare saying now - ie, Framesets are not overly fashionable....lol...need more sleep! :)Rob 这篇关于关于'隐藏'表单控件的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!