Development Server Is Not Updating Changes To Markup / Code?

Sep 1, 2010

I've been working on the ASP.NET Development Server recently (on an MVC project and I'm finding that it is inconsistent in how it serves the changes I make to my code. For example, I make a change to the C#/HTML/CSS/JS in the dev environment and run the page, and the change appears on the screen. But if I edit the HTML again and run the page again, the new change doesn't appear. Even ctrl+F5 doesn't do it. I have to stop the web server and run the app again for the changes to update. Has anyone else experienced this? Is there a way to sort this problem out?

If I'm working in IIS and I change something, a ctrl+F5 will always update the page with the changes I've made. I'd like the dev server to be as reliable.

View 2 Replies


Similar Messages:

Forms Data Controls :: Strange SqlDataSource Behaviour Updating GridView On Server Vs Development Machine?

Jun 10, 2010

I'm having a strange problem - probably has a simple answer but, I haven't been able to find it or figure out the cause. I'm hoping someone has had this same problem and figured it out.

Basically - my application works great on the development machine. So I copy it over to the server and it works great. Come back the next day and my GridView is only displaying the first record...I then log into the server remotely and open the web page on the server and all records are returned, so the application works fine on the server. I then return to the local machine and now the application is returning all rows in the GridView. So, weird but, what whatever, it works. Go away and come back again the next day and...

1 ) Only 1 record from dataset is displayed in GridView

2 ) Log onto server remotely and view webpage on server --> all records now display

3 ) Try again on local machine, now application works fine...grr. What am I doing wrong here? Using Visual Web Developer 2008 on Windows XP. Querying SQL Server 2000 (I know, I should switch to 2005 and use VWD 2010 - but ouch, really!) when a text box value changes (Vendor_PO_TextBox.TextChanged)

[Code]....

View 1 Replies

.net - Markup Code Inside Custom Server Control?

Dec 29, 2010

I'm new to custom server controls and I'm hoping to use them to build various 'modules' for different sites I build to cut down on duplicate code.I'm familiar with custom user controls in which I can create an .ascx & .ascx.vb file which can then be imported into an .aspx page and used freely.However, with custom server controls I cannot find a way of using markup/html code. Is this possible at all or must all code be created programmatically?

View 1 Replies

How The Server Process The Page - Code Behind - "markup Mixed With HTML Elements"

Oct 23, 2010

I want to know how the server will process my page that contain:

1- ASP.NET markup mixed with HTML elements.
2- Code behinde.

Will it read the ASP.NET markup line by line and even HTML elements? And then reads the code behind? or what exactly?

View 1 Replies

C# - Possible To Do Inline Code In ASPX Markup

Jun 1, 2010

Is it possible to do things in a PHPish way in ASP.Net? I've seen <%= %> but I've tried it and couldn't get it to work. The PHPish equivalent of what I want to do is

<script src="<?php echo ResolveUrl("jquery/js/jquery.js"); ?>"></script>

View 1 Replies

Write HTML Markup From Code Behind?

Apr 4, 2011

What is the Best way to write my own HTML from code behind?

i currently use this :

<asp:Literal ID="ltr" runat="server"></asp:Literal>

and from code behind :

ltr.Text = "<p class="specific-class"></p>";

is it a right to do something like this?

View 2 Replies

C# - Code In Markup For A Link-href (.Net)?

Dec 17, 2010

I have an aspx-Page with an anchor-tag. Itīs href has to take a parameter of thepage, which is a public member.public int CommissionId

{
get
{
//..
}
}

I know how to design the link in code-behind, but want to do it in Markup.I tried

<a href='<% String.Format(@"Details.aspx?commissionId=" + CommissionId) %>' runat="server" id="cancelLink" class="button" onclick="this.blur();"><span>Back</span></a>

View 2 Replies

WebMatrix :: Razor Syntax - Separate Code From Markup

Aug 28, 2010

While it has gnerally been advocated to separate code from mark up and all that, with the razor syntax and webmatrix all that is not valid anymore, I think. WebMatrix encourages code and mark up in the same page! So what is the best practice as far as code and mark up is concerned.

View 6 Replies

C# - Difference When Declaring A DataSource In Markup Compared To Code Behind

Jan 13, 2011

I have a legacy solution where all the DataSources are defined in the markup for all .aspx-pages. The problem I have with this is that the DataSource get instantiated several times since it is used in page, control... What I want is to have NInject to handle the instantiation of the DataSource so this doesn't happen. I have got that part to sort of work, but when the DataSource is defined in the code-behind instead of in the markup the Page property is not set on the DataSource, does anyone know why? A simple solution to this is to set the the Page property in a base class or something, but I do think that the property should be there and want to know why.

View 2 Replies

E-mailing Forms: Adding HTML Markup To Code-behind?

Apr 13, 2010

I'm trying to add some basic HTML markup to my code-behind, just a H1 and a few breaks separating strings in the message.Body, but can't seem to get it going without errors.

[Code]....

Probably a straightforward thing, or not intended usage at all,

View 4 Replies

Accessing User Control Properties Defined In Code Behind In Markup?

Feb 9, 2011

I have a public property defined in code behind of a user control. I want to toggle visibility of controls in the markup based on the property's value.

However, using the following syntax:

<td style="display:<%#(Container.PageControlMode == PageControlMode. PageMode.Wizard) ? "none" : "inline" %;">

I have the following property in my code behind:

public PageMode PageControlMode { get; set; }

Does not work and generate errors.

View 1 Replies

C# - Extend Control (ASCX) And Access Base Markup File From Subclass Code?

Jan 29, 2010

I'm building form validation controls for our C# ASP application. The bulk of the work is handled by a BaseValidator control (subclassing System.Web.UI.UserControl), which also has the markup for the validation output. This is then extended by subcontrols like PasswordValidator, that provides the Validate method and any extra fields needed by that validator control.

(The end goal is to have controls like <uc1:PasswordValidator ControlId="txtPassword" /> which we can plop into any form with minimum duplication.)

However, PasswordValidator.ascx.cs cannot access the form elements defined in BaseValidator.ascx; the only way I've found to do so is to duplicate the markup in each subcontrol's *.ascx file. How can I extend BaseValidator.ascx.cs and access BaseValidator.ascx's markup in the subclass?

View 3 Replies

C# - Server Tags In Markup?

Feb 4, 2011

Morning all I have frequently used the old

<asp:Label ID="lblWas" runat="server" Text='<%# XPath("FACEVALUE") %>'></asp:Label>

This type of thing. when I first came across it I loved it, i'm using it again today but not quite so simply. I have a number of extra things I would like to achieve.

Apply formatting to the value. Like Text='<%# string.Format(XPath("FACEVALUE"), "{0:c}") %>'>
<asp:LinkButton ID="lnkBook" runat="server" PostBackUrl='/THEATRE/' + XPath("FACEVALUE")>Book</asp:LinkButton>

For option number 2 the URL is not as I would expect, and for number 1 I cannot get the syntax correct if it's even possible.

I have not been able to find something suitable in google. Hopefully what I am trying to achieve is obvious from the example :)

View 3 Replies

Code To Auto Authenticate When I Am In Development?

Feb 19, 2010

I am developing an app that needs a user to be logged in to function. I am developing the app and it kills me to to ALWAYS have to log myself in everytime I start the applicatiion for debugging (300 times a day...)How can I have my app log myself in in code behind everytime I start the application?

I tried this in the master page but did not work

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

If Not Page.User.Identity.IsAuthenticated Then

Membership.ValidateUser("bcweedout@live.ca", "brazil")

FormsAuthentication.Authenticate("bcweedout@live.ca", "brazil")

End If

End Sub

View 6 Replies

Custom Server Controls :: Design Time Markup End With />?

May 7, 2010

I'm developing a custom server control and want it to end with /> rather than with </cc1:CustCtrl>. I've tried changing the ToolboxData but it didn't really do it (I can see it initially appears like that but instantly changes to the standard <cc1:CustCtrl blah blah></cc1:CustCtrl>. When i drag a button from the toolbox to the forms markup it uses the <asp:Button blah blah /> markup, how can I emulate this?

View 3 Replies

Web Development - Looking For Navigation Menu Editor With Source Code

Jan 3, 2010

web-based so it can be used by users and hopefully using the class SQLSiteMapProvider which allows for saving sitemap in a SQL Database instead of XML.

View 1 Replies

C# - .net Development Code Structure -Controllers, Services, Repositories & Contexts?

Dec 11, 2010

As a new developer I'm getting thoroughly confused by naming and structural conventions for developing c# code using best practice.I appreciate it's perhaps applicable to each domain I am developing for but I've seen the code of many different open source projects and there seems to be a common theme. The successful projects have well thought out structure for maintenance and extensibility.The terms context, service, repository and controllers are used often and I wondered if these are open to interpretation or is there a consensus or convention on what, where or how these get used.

In an e-commerce platform I've seen there are order services, order contexts, customer repositories and product controllers for example. What should they do based on these names? Does a controller do something different to a service? When should you use a context? Is there a convention for namespaces? It's mind boggling when you try and push from a spoon fed newbie developer and try to move on.What software/tools should I really be looking at to develop quality code? Unit Testing, Continous Integration, Resharper, Mocking tools, DOI Containers, nHibernate.

I'm not really aware of blogs/books that will help me push on from being a proficient web developer into someone who can develop extensible, quality and testable code. There are big gaps in authors assumptions. You are either a newbie or a software architect. I want to push from being a junior developer with a long term aim of being a software architect. I realise it's all about patterns and practices but where are the training materials? I work on my own so don't have the opportunity of learning from others.

View 2 Replies

Web Forms :: Timer Control In Markup, But Code-behind Saying "not Declared"

Dec 28, 2010

When I first created a timer (Timer1) I handled the Tick event. No problem, intellisense worked and the timer control was declared then. I toggled it's enabled property, no problem.

I just went to look back at the _Tick event for the Timer1 control, and it has the blue underline mark in VWD that says that Timer1 is undeclared. I looked back at the markup and the <asp:Timer ID="Timer1" runat="server" ... /> control is there. I don't understand why all of a sudden my code-behind class is not recognizing the ID of my timer control.

The page runs fine, but it is throwing me off why VWD is seeing this as an error when I hard-type the control name.

View 9 Replies

Visual Studio :: Cannot Connect To Development Server After Closing The Server And Restarting The Project

Sep 29, 2010

I'm getting "Cannot connect to ASP.NET development server" almost every time I stop the ASP.NET server before restarting the project in debug mode. It can take between 15 seconds and 2 minutes to get the error message, and Visual Studio is frozen.

Sometimes I get three in a row, and I have to wait 2 minutes each time, or go into Task Manager and kill to process. Then I have to start Visual Studio 2010 again, which is at least three times slower than Visual Studio 2008 to open.

It's *extremely* annoying. I know I don't have to close the server if the code has changed, but sometimes I simply want to restart my website in debug mode (there is a cache on most web service calls, so this clears the cache). A workaround is to add "foo" code to a class and restart the project.

I'm running Visual Studio 2010 Professional on Windows Server 2008. I'm running the Visual Studio Power Tools too, with the latest update.

View 1 Replies

How To Host Site With ASPNETDB.MDF Database From Development Server To Production Server ?

Jan 21, 2011

I have created my site using ASP.NET Personal Starter Kits 3.5. I use Visual Studio 2008 only . .with its built-in SQL Server (2005 Express) ... my database in App_Data is ASPNETDB.MDF ...

I have created some of my tables also ....in ASPNETDB ..

In my local PC the site was running fine ...

But when I publish my site on production server it doesn't work and shows the following error

<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>


Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>


My hosting provider connection string ..

<add name="ConnectionString" connectionString="Data Source=69.16.253.19;Initial Catalog=usa_data;Persist Security Info=True;User Id=user;Password=pass" providerName="System.Data.SqlClient"/>


My hosting provider gave me the connection string to connect to the SQL Server 2005 but it doesn't work...

I don't understand why my site was running fine using the production SQL Server 2005 in my local PC when I include ASPNETDB.MDF file in App_Data in my local pc only ..if I remove file ASPNETDB.MDF from App_Data of my local pc ... the site stops working ...

Can anybody tell em how to fix this ... !! I am very tensed since last 3-4 days

View 1 Replies

DataSource Controls :: How To Transfer Data From Development Server To Production Server

Jul 8, 2010

how to transfer my data from devlopment server to production server ,i have already records exist in my database if i go for script then how can i transfor record in script i can transfor only table ,procedure and views.I am using SqlServer 2005.

View 2 Replies

DataSource Controls :: Copy A Database On A Development Server To Local Server?

Jan 12, 2010

I want to copy a database on a development server to my local server. I am not the server administrator but I have rights to the database. Soon after the wizard Executes the SQL Server Agent Job it fails and the error message says:

The job failed. Check the event log on the destination server for details.

Where do I find this log? Also what could be the problem?

View 3 Replies

Web Forms :: Web.config File - Worked In Development Server But Not In QA Server?

Mar 3, 2011

Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

View 5 Replies

Configuration :: Switching Between Development Server And Production Server?

Mar 22, 2010

I am wondering the best way to change my connection string based upon which server I am accessing.

Essentially, all of the development is done on our local machines - once we think it is working, we upload it to our development server. In these 2 instances, I want my application to go off of our "dev" connection string for the SQL database in the web.config.

However, once it is published to our production server (for an internal application), I would like the connection string to point to our live db.

I am using the N-Tier model by Imar Spaanjaars - and have it setup like he suggests - In my DAL I have a class called AppConfiguration -

In this class I have a public readonly property ConnectionString() which returns the connection string in the web.config.

This is in an individual class library. What I would like to do is something similar to:

If server is localhost OR devstring return devString else return productionstring

View 1 Replies

How To Write Row Updating Code

Apr 9, 2015

how to create gridview (with code).i am trying to build a table (gridview) where i can just edit and update.

Code:
<div class="content">
<div class="table-responsive">
<asp:GridView ID="gvTable" runat="server" ClientIDMode="Static" AllowSorting="True" ShowHeaderWhenEmpty="True" SortedAscendingHeaderStyle-CssClass="sorting_asc" SortedDescendingHeaderStyle-CssClass="sorting_desc" HeaderStyle-CssClass="sorting" AutoGenerateColums="True" onrowediting="gvTable_RowEditing" onrowupdating="gvTable_RowUpdating" >

[code]....

How do i update the existing data and it will auto save in my sql database.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved