Startup Article Over The Mixture Of MVC And Dynamic Data?
May 26, 2010startup article over the mixture of ASP.NET MVC and Dynamic Data?
View 1 Repliesstartup article over the mixture of ASP.NET MVC and Dynamic Data?
View 1 RepliesUsing Visual Studio 2008 (but have VWD 2010 available). Desire is populate a cell from a number of database items that have been concatenated together. Exampler would be Smith, John, 2010, Going After an Ideal Solution, 500 pages. Gridview allows me to set the cell format, but for the entire cell. I would like to present this as a mixture.
View 6 RepliesThe following dummy code in a view file works fine:
[Code]....
It simply displays "iFoo = 3". Commenting out the if block as following does not work:
[Code]....
What is the correct way to comment out a mixture of C# and html code in a view file?
i need to display image for every article in my page (articles information in data base ) and i have control panel to add,delete,edit articles how to display image for every article i made fileupload that store images in folder ,but when i insert article's title,details, image name ,the image does n't appear in page
i wrote ImageUrl='<%#Eval("image")%>'
I have a Listview showing all articles. And i'd like to show the number of comments that... that article has.
Shall i call a method inside the listing ?
Then on my code behind i started implementing the following code:
[Code]....
Where on my listview shall i call this function ? SHould i return an int ?
I'm using a file "image.aspx" (with code-behind file "image.aspx.vb") to retrieve an image stored in SQL and display it in my file "main.aspx". But it is not working (I get an image error display/red "x" icon instead of the image). (All other non-binary data is retrieved/displayed fine; no "designer" file is generated/used in this project). Can anyone tell why the image is not displaying? Below is the relevant script ("Avatar" = column in SQL table containing the image file):
1. from "image.aspx" page ("template.master"---not shown here--contains form1 referenced further below):
[Code]....
2. from "image.aspx.vb" page:
[Code]....
3. from inside the script tags in the "main.aspx" page:
[Code]....
I currently have a label in an ItemTemplate that looks like this:
<asp:Label ID="bodyLabel" runat="server" Text='<%# Bind("body") %>' />
How do I only show the first paragraph of the article and then allow the visitor to click to view more?
Are all loaded on web app startup or only when they’re invoked (i.e., when their code is used)?
View 1 RepliesI used Castle Windsor before and had this routine that fired the certain method of all classes that implement a certain interface.If I recall correctly, the interface was IBootStrapTask and only had an excecute method. Then, for instance, I'd place all my route registrations in one of these, and know it get fired on application startup.Have to admit I did not understand the code to well, so I'm even more unsure how can I do this. I'm using structure map now. (still knowing very little about it)
View 1 Repliesi would like to run a command prompt to run the project and set its startup project
View 2 RepliesI am in a partnership with someone. We are currently planning a system that can either use ASP.NET MVC or PHP With //Insert your framework here//. At this stage I can't say to much. Now the thing is I have a bit of experience with C# and MVC. I understand the concepts and actually wrote a fully functional blog with it. Now the other side of me wants to take PHP for a test drive. Will I waste my time? How good will ASP.NET MVC scale against PHP? I have to say that I love visual studio and the integration of MVC tools like quickly adding a view and a controller... Everything fits nicely. But the learning curve was quite steep and still is. I haven't really touched AJAX and Jquery yet but how easy is it to use it with ASP.NET MVC? I already googled and researched this but I want opinions of those who have been working with these technologies.
View 6 RepliesI have a site in which I have defined my Start up page, say Sample.aspx. After deployment in server named "Siteserver, Now whenever I open link [URL]. Now, my question is, if I have more than one page like Sample1.aspx and Sample2.aspx and I want to open [URL] directly, how can I do this. It is redirecting again to Sample.aspx. How can I achieve this.
View 1 RepliesI know that when a .NET web application first starts, it will be slow on first access. For that reason, I created a 'keep alive' page in the application that is requested every 8 minutes or so by a scheduled process. I hoped that that would be sufficient to prevent the application from 'unloading' and thus suffer from this initial long startup time again and again.
I can see in my logs that the 'keep alive' page is indeed triggered every 8 minutes, 24 hours a day. But when I actively start working in the application after some time, eg. the following day, I still have to wait a while for it to start up. Once the first page is loaded, all is fine again.
I have around 10 "Excute SQL Task" events in sequence. Each Task uses the same two date parameters, which are declared at the top of each script. Is there a way to set these two at the start of the process instead of within each sql script?
View 2 RepliesI'm trying to troubleshoot a plugin issue and I've seen references to 'take a look at the VS startup log'.
View 2 Replieswe have this problem but can't find a solution. We have an application that references something like 24 dlls. When you invoke the application the very first time (after the application is for any reason reset) it takes 25-40 seconds to start loading contents.
This is what we tried:
1. precompile and publish everything in release mode
2. removing pdbs from bin folder
3. put strong named assemblies into GAC
4. set application to debug = false
consider that the whole bin folder is composed by 24 dlls for a total size of 28MB. Just 4 of these dlls are strong named and they are more and less 25MB. Nothing seems changed. What happens EXACTLY when the application is started is something I couldn't find in any book nor forum/blog/post... What can we monitor more to find where the problem is?
I went to the Code Plex site and down load the latest toolkit. Then followed the instructions on how to set up the toolkit to the letter. When I first loaded the toolkit everything worked. But now every time I start up my computer and start VS all the AJAX controls I have on any page has the green squiggly line underneath it and the error says:Element <AJAX Control Name> is not a known element. This can occur if there is a compilation error in the web site, or the webconfig file is missing.The only thing I can do is delete the Ajax Toolkit tab then add the tab again and then "Choose Items..." and load the Ajax controls again. Then I have to add an AJAX control from the toolkit to any webpage. Once that is done all the green squiggly lines go away and I can continue.This is becoming an incredible pain.
View 1 RepliesWhen I start debugging my application using vs2010 before the default.aspx page is rendered the application_error event is fired in global.asax.
There is nothing happening in the page_load of the default.aspx screen.However, if I set a break point on the default.aspx page_load event and the application_error event here are the sequence of events: The page_load event of default.aspx is fired, there is no code to execute there so I hit F5 to continue. The application_error event is then fired.Here are some of the details from Server.GetLastError();
exception message is "File does not exist."
stack trace:
at System.Web.StaticFileHandler.GetFileInfo(String virtualPathWithPathInfo, String physicalPath, HttpResponse response)
at System.Web.StaticFileHandler.ProcessRequestInternal(HttpContext context, String overrideVirtualPath)
[code]...
I have absolutely no idea why this event is fired. Do all of the events in the Global.asax get fired on startup?There is nothing happening on the page_load so how can an error be thrown?
My application is running in a shared hosting environment. I do have a dedicated App Pool for my app. I've been doing some testing with 1st visits and precompile performance and have been tracking when my application starts up and shuts down.
In my Global.asax I have some logging code in Application_Start and Application_End. I can see from my logs generally when the application is idle and shuts down, then someone visits and it starts back up.
But, I also see cases where a shutdown is logged and then followed by another shutdown about 13 minutes later; without a startup in the middle.
I also see instances where there are two Startups in a row. I'm guessing these might be a recycle, but why wouldn't there be a shutdown log entry?
What I'd really like to know if there is a better way to track when my application starts, when it shuts down and if it is shutdown due to an idle pool, or from a recycle. I don't have access to the Windows Event Log so I need to do this from my app if possible.
I'm trying to find a hook / way to run some initial code to wire up a bunch of things before a service is called.
View 2 Repliesi am trying to ste my Home Page other than Defualt.aspx in IIS but im getting a message saying This is a marker file generated by the precompilation tool, and should not be deleted! i do my precompilation of web project using aspnet_compiler -nologo -f -v i do not want to use Default.aspx and route it to the Home Pgae. it works in Visual STudio but when i deploy it to IIS it gives me this message.
View 2 RepliesI have a scenario in which 5 buttons else two or more same controls need to access the same startupscript (ASP.NET). Is it possible?? If so give me a details code snippet.
View 1 RepliesI use asp.net mvc & going to build javascript files at application startup depending on site configuration.
I am going to have some javascript file templates that will be populated with appropriate constants and put into /scripts folder.
application_startup()
{
string populatedFile = Html.RenderPartial("/scripts/script.template.js");
write populatedFile into /scripts folder...
}
I want to be able to create a style sheet at session startup (based on a large number of variables... this sheet must be created on the fly and can not be hard coded). At the moment i can set up styles and apply them to controls using the VS designer (html behind of a page). But i need to be able to create these styles at runtime because they will differ for each session. The names of the styles may not differ, but the elements inside the style will be changing.
I figured that one thing i could do is create a css file using System.IO to create the file and then use that to apply (but even then, im not sure how i go from creating the file to including it in the project at runtime), but is there an easier way?
Is there a way the Start page can be saved in the Project file of a Web Application project.
Right now it saves in the user file, I tried moving the tag in the CSProj file along with the IIS VD creation tag, but it didnt worked.