|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ASP.NET 2.0 won't let me put my user controls in the same directory as Web.configWhen I put my *.ascx files in the same directory as Web.config and my user
controls are registered in Web.config it gives me an error. Putting my *.ascx files in another directory is not hard, but it can cause another annoyance: relative directories. For example, that means that I need to write code to add a ../ to the beginning of all relative directories used in the user controls, which can be a real pain, especially if the directory is being passed as a parameter and you do not know beforehand whether it is a relative directory. Is there any way to allow me to put my *.ascx files in the same directory as Web.config? Thanks. How you are planning to use your user control ?. If you programatically
going to use all your user control all you have to do is create seprate folder for all user control in your project root directory and use ../<your control directory>/controlname.ascx. If you are going to use the control in designer , let the VS.net do all the nessary work for you. Just drag and drop your user control to the page where ever you want to use. Show quoteHide quote "Nathan Sokalski" <njsokal***@hotmail.com> wrote in message news:eXMEDBm3GHA.4024@TK2MSFTNGP03.phx.gbl... > When I put my *.ascx files in the same directory as Web.config and my user > controls are registered in Web.config it gives me an error. Putting my > *.ascx files in another directory is not hard, but it can cause another > annoyance: relative directories. For example, that means that I need to > write code to add a ../ to the beginning of all relative directories used > in the user controls, which can be a real pain, especially if the > directory is being passed as a parameter and you do not know beforehand > whether it is a relative directory. Is there any way to allow me to put my > *.ascx files in the same directory as Web.config? Thanks. > -- > Nathan Sokalski > njsokal***@hotmail.com > http://www.nathansokalski.com/ > Several problems with that occur when a directory is entered as a user
control property. I want a way to programmatically access the directory of the page that is using the user control. One of my goals is to use MakeRelativeUri in my user controls, but I keep ending up with the control directory before what would be the correct output. Any ideas? Thanks. Show quoteHide quote "Baski" <ba***@aldensys.com> wrote in message news:eTzzeAn3GHA.2228@TK2MSFTNGP03.phx.gbl... > How you are planning to use your user control ?. If you programatically > going to use all your user control all you have to do is create seprate > folder for all user control in your project root directory and use > ../<your control directory>/controlname.ascx. If you are going to use the > control in designer , let the VS.net do all the nessary work for you. Just > drag and drop your user control to the page where ever you want to use. > > > "Nathan Sokalski" <njsokal***@hotmail.com> wrote in message > news:eXMEDBm3GHA.4024@TK2MSFTNGP03.phx.gbl... >> When I put my *.ascx files in the same directory as Web.config and my >> user controls are registered in Web.config it gives me an error. Putting >> my *.ascx files in another directory is not hard, but it can cause >> another annoyance: relative directories. For example, that means that I >> need to write code to add a ../ to the beginning of all relative >> directories used in the user controls, which can be a real pain, >> especially if the directory is being passed as a parameter and you do not >> know beforehand whether it is a relative directory. Is there any way to >> allow me to put my *.ascx files in the same directory as Web.config? >> Thanks. >> -- >> Nathan Sokalski >> njsokal***@hotmail.com >> http://www.nathansokalski.com/ >> > >
rotating image
vbCrLf Querying a database using vb Get value from nested class using reflection Want to know the power-2 based numbers of x OpenGL Refresh problem using CsGL with VB.NET How to disable the UAC in Vista? String Comparision Program Flow How to keep statusStrip at the bottom of the ToolStripContainer |
|||||||||||||||||||||||