Configuration :: Adding Key Value To Aspx Page (design View)?
Jul 29, 2010
I am developing on my local machine, therefore my url is http://localhost/<VirtualDirectory>/ My site is hosted at http://www.<DomainName>.com
For example: my link to css file is <link href="/styles/styles.css" rel="stylesheet" type="text/css" />
This works fine on on the public site, but breaks on the dev machine because of the addition of the virtual directory level.
I want to add a key to my config file to manage the current location of the site: <add key="CurrentServerLocation" value="http://localhost/<VirtualDirectory>/"/> or
I have a very strange problem with my website... I created a rather large page, consisting of a few tables with some labels and textboxes where the user can enter a mechanical car setup (it's for a racing game).
When I put a couple of these boxes on a page it works just fine, I can only enter numbers. For it to work though I need to add the script to the page and I do that using this line, either in the head content or in the body content controls:
(the path is chosen with the 'Pick URL' dialog so it should be alright, and it does indeed need to go up two directories first as the page is in the '~/Pages/RequireLogon" directory) However, after replacing most of the textboxes on my large page with NumericBoxes, and adding this script line to my aspx code, the design view is 'broken'. I cannot see any of my controls anymore, and I cannot even put any new controls on there. It seems like the Content control is missing, even though it's still there just fine without errors in the aspx code.
When I remove the script line, the problem is fixed again, the controls re-appear. So it's definitely the script line causing the problem, but I cannot see how it could...I tried it with a new blank page and the problem appears there too. If I use this simple page with just a button:
I've always depended on putting a control on an aspx page and double-clicking in design view to create my VB page. But this isn't happening in my current project. It creates an inline script in my aspx page instead. Where is the option or preference or XML file or.... that controls this?
We have three options to view any .aspx page in a tab
Design Source Split
How can we view Design and Source in separate tabs for a any aspx page ?
Or if this is impossible!! can we use split option by Vertically splitting the Design and Source ? if later one is possible, I could stretch the view onto two monitors like here as suggested by Nick Craver.
We have two installs of VS 2008. One on a machine that previously had 2005 installed and one on a new [clean] machine with no previous Visual Studio install.The clean machine install went fine, however when we open an aspx page in design view the layout is "scrunched" up. In source view the text matches the text in source view [of a copy of the same aspx page].In design view on the 2005/2008 VS installed machine, the layout is fine.Layout on the page is done in a "Table", with various text boxes, buttons, gridviews.
And just to reiterate, the aspx file in design view [using VS 2008 SP1] on the machine that has VS 2005/2008 installedlooks fine, no problem.The same page loaded in design view on the clean machine with VS 2008 SP1 installed is "scrunched" up.For example the gridview that should be at the top right of the page is in left-center of the page and the gridview that should be at the bottom-center of the page is also at the left-center, directly on top of the gridview that should be at the top right sideof the page.Have compared the config of VS 2008 on both machines and can't find a problem!
I work in VS 2008. Whenver I add a server control(Label) and set it properties in aspx.vb and build the solution, I get the error "Label1 not declared". While analyzing this issue I noticed that the event handler statements for the Label1 where not added in the designer.asp.vb file. These statement would actually be added automatically when I drag and drop a control to my webpage.
I would also like to inform the scenario after which this problem came to me. I was working in VS 2008 , VS 2005 and VS 2003 in the same machine.Could this have caused the issue ?
Now each and everytime when I add a control, I am adding the "With Events" code in the designer page to make my build succesfull which makes me to spend more efforts.
But when i go to Design View of the page (for creating the events automatically or for drag/drop any new control from toolbox, I don't want to type everything) the design view only shows the master page! the page controls are complete ignored!
In my company we use a control that renders the <link rel="stylesheet"> tags dynamically at runtime (equivalent of scriptmanager who renders <script> tags dynamically). this control is very good, cause it select the appropriate css stylesheets depending on some criterias. The problem is that on design time for Visual Studio there is no designated CSS stylecheet since there is no <link rel="stylesheet"> tags on the page.
If I put <link rel="stylesheet"> tags on the aspx page (to indicate a design time stylesheet) this tag will be rendered to client and it causes conflicts with tags rendered by the control !
I noticed a behaviour in Visual Studio that the design tab for aspx page does not work if I use a dynamic master page using a base page. I dynamically set the master page to implement theming. It shows a master page error and says "The page has controls that require a Master Page reference, but none is specified".
Is there any solution? Or any work around?
I currently set the base/master page to a default master page in the page for myself and work on the page. Once I complete the page, I remove the master page attribute. I wanted to know if some better method is available.
When I'm in Design View I can't scroll down to the bottom of some of my pages. I've scrolled down as far as I can and the bottom is cut off. This doesn't happen on all the pages. I tried increasing the height for the ContentPlaceHolder.
can't connect to sql 2005 express sp1 and vs is also sp1. 2) Which my guess is because of the database connection not being able... design view is not able to pull in the application for design, it's as if there is no theme and css just white background and black print.
I have hosted my project in the remote server. i pasted all the dlls & all the necessary files into inetpub->wwwroot ->httpdocs->(pasted all files). In the server we have .net framework 3.5 and IIS 6.0
Now I just want to check whether my files are running locally on the server. So I did the following. Just opened the IIS, made the httpdocs folder as a virtual directory. And then I clicked the httpdocs.It displayed all the files it has in the right side pane. Then I right clicked the default.aspx and then I clicked browse. Now the browser opened with the URL http://localhost/httpdocs/default.aspx. But I could not able to see the aspx page.It just shows "The page is not found"
But when I tried the same steps for opening a .html page it works fine (http://localhost/httpdocs/test.html) I can able to view the html pages.
Whether I need to configure anything on the IIS.... What should I do to view the .aspx files
I have asp.net web site which has master page ajax and css file....
I have change masterpage and change master page reference in each page to new masterpage name. then i open aspx page and open in design view no problem i can see new lay out colours and images, when i right click on file name and click on view on browser page open in IE but not images no styles. try on Firefox same problem.
Not sure if this is for SQL or .net! I have 3 tables which looks like
table1 ID Name 1 Jon
table2 ID Number Job 1 1 IT 2 1 Web 3 1 Admin
table1 ID ContractType 1 Temp 1 Perm
An inner join makes one table with 3 rows (I excluding the ID from table 2 for the join) which is saved as a view
viewTable ID Name Number Job ContractType 1 Jon 1 IT Temp 2 Jon 1 Web Temp 3 Jon 1 Admin Temp 4 Jon 1 IT Perm 5 Jon 1 Web Perm 6 Jon 1 Admin Perm
I want to display these results on a web page via the grid view. However, I don't want to show the user 6 times! I want to show the user name once, the contract type once and each Job! What is the best way to do this? Is there a fault with the database design already? I assume the easiest answer is to not join them in a view but query each section 3 times from the website but I'd rather 1 connection only!
I have an aspx page which I am pasting the code from. This page is a preview gallery which when I create a new gallery in my admin panel it auto updates to this page and places the text name I assign in the admin and assigns a page link which takes users to the actual gallery page for that preview... for instance I log in as admin and select manage free gallery.. enter the gallery name (for example" free preview") upload 8 or 9 images and a slideshow then hit submit. The gallery is then created and a link to that gallery is placed on my page for all free galleries. I want to not only have a link but an actual thumbnail image for these.. how would I do this given the code I am pasting below? I would also be willing to just eliminate the text link and go with a clickable thumbnail with a short description under it which actually would probably look better anyway. Pasted ASPX Code follows:
I have a running ASP.NET web site. There is following problem with one of the forms:
One part of submitted data is added to database after "submit" is clicked. (to "table1") Another part is lost (not added to "table2", and no files uploaded) I have no source code of that project. So, because I cant edit existing page, I came to a decision to add new .aspx page to a running application with same functions as existing one. How can I do that? Or maybe you can recommend some other solution.
First i had taken Default.aspx Page .after that i added master page to my project.Now i want to include this master page into default.aspx page I was mention master page attribute in Page directive of defult.aspx.
Now problem is i am not able to Get the attribute of <asp:contentplaceholder>.
Add 2 user controls and display them on your default aspx page. One control will be a simple list of store contact information. The other control will be a featured product control which displays a featured product of your choosing with an image and a description.
So i created a web user control page something like stewiecontrols.ascx
And I want to how to register the page <@control ...... src="" prefix name="" prefix tag="" /> the rest of the code in html <div> ..... </div> tags.
My question is this. I'm creating a master page and the default page is created using master page. So how do I register this .ascx page on default page. Should I register the .ascx page under master page or how. I want the user controls to only be shown on default.aspx page.