I am beginning on ASP.net MVC. All the articles I have read so far mention REST as a key feature in MVC implementation
My question: is REST mandatory for MVC implementation?
It just started experimenting with the ajax.net ToolkitScirptManager and it works fine but then I realized that it is breaking my ajax calls I'm doing using the jQuery library. I'm guessing that it is the issue with the $ symbol, does anyone have anythoughts on how to use both libraries.
I don't want to use jquery's noconflict mode because we use other jquery plugins that I'm afraid won't work.
Any thoughts?
Like most web applications you have a method that gets called when you log in.
There are a few things that may need to get done when logged in and over time this may increase. eg. logging, welcome emails, maintenance.
Should events be used to do this or is there a better way?? I'm using C# and ASP.net MVC.
This may be a bit of an abstract question, so apologies in advance.
I am looking into generics in .NET, and was wondering about the where T : struct constraint.
I understand that this allows you to restrict the type used to be a value type. My question is, without any type constraint, you can do a limited number of operations on T.
Do you gain the ability to use any additional operations when you specify where T : struct, or is the only value in restricting the types you can pass in?
Using ASP.NET 3.5 with VB codebehind.
I don't want to use a webservice to populate an autocomplete extender on a textbox. In this case, it's where the user is entering email addresses and I don't want to make a trip to the database every single time. I'd much rather keep a collection in session state and 'bind' the autocomplete to that.
Is it possible to set ServicePath and/or ServiceMethod to something in the codebehind as opposed to a webservice?
In Asp.net MVC one is encouraged to derive custom ActionResults, however should these classes handle other tasks unrelated to views, perhaps a EmailActionResult would render a view then send an email. What is best practice for the class ActionResult, is it only view specific? I want to keep things DRY too. Should the sending of the email be factored into a service class? perhaps using a filter would work. what are your thoughts?
I have a partial view (UserControl) that implements a simple pager in my Asp.Net MVC project. This pager needs access to a .js file that needs to be included exactly once, regardless of how many instances of the pager control are present on the parent page.
I've tried to use Page.ClientScript.RegisterClientScriptInclude, but it had no effect (I assume because the code nugget was evaluated too late to impact the head control). Is there any simple alternative?
I download menu from http://apycom.com/menus/1-white-smoke.html. When include this menu in my ASP.NET MVC aplication in home page (site.master) menu.js generated link to http://apycom.com. How I remove this link from page?
In my ASP.NET application I want to implement by data acess layer using the Entity framweok so I can use it as an ORM tool. But I dont want the rest of the application to care that I'm using this or be polluted by anything entity frameowrk specific.
I cant seem to find anyone who is using the entity framework exclusively in their Data access layer so I'm keen to see any online examples of this/ experience people have.
I'm new to MVC and ADO.net Entity Framework. Instead of having to create an edit/display for each entity, I'd like to have the controller base class generate the view and validation code based off metadata stored in a table - something along those lines.
I would imagine something like this has already been done, or there are good reasons for not doing it. Any insight or suggestions are appreciated.
I want to use ApplicationSettings in the markup code of an ASP.NET Web Application. Inspired by code behind this was my first try:
<%= My.Settings.MyApplicationSetting %>
No success.
I ended up with this lengthy statement
<%= Global.MyRootNameSpace.My.MySettings.Default.MyApplicationSetting %>
I can’t believe that this is the best solution. Isn’t it?
I have a site that will not use theming. But by default the value is set to true. Does ASP.NET do a check everytime to see if I'm using themes. Is there a performance hit?
Thanks!
paul
Are there any security issues keeping the .NET PDB files on the real server?
I know that throwing exceptions might take a bit longer , but who throws exceptions during normal execution anyway? :-)
But from a security perspective? any issues?
I have a page where a text file is downloaded when I button is clicked. When that happens I would then like to direct the user to a confirmation/more details page.
I am using visual studio 2008 and it is VB.Net in 3.5
I'm doing the first bit of web-page development I've done in years, in VS2008, using VB.net. I have a fairly simple layout, which is using several nested tables. IE6 displays the layout just fine, but Firefox for some reason shows the whole thing in a small panel at the top of the page, with a scrollbar. Can anyone suggest something basic I am likely missing?
Hi,
I am very new to .net applications. I have to create a sample ASP Webserice application in Visual Studio 2005 version, i am getting error: " 'system.Data.dll' was not found on the reference search path ".
Please any one help me on this.
Thanks,
Ravi
I am currently trying to add 301 redirect to my routes in MVC
to do this I have tried to inherit from the MvcHandler.
The handler gets instantited with the right values. but I am never able to debug the overridden methods.
can someone show me a working attempt at this? the asp.net pipe simply seems to the doing its own thing...
public class CodeHttpHandler : MvcHandler
{
public CodeHttpHandler(RequestContext p_requestContext)
: base(p_requestContext)
{
}
protected override void ProcessRequest(HttpContext p_httpContext)
{
}
protected override void ProcessRequest(HttpContextBase p_httpContext)
{
}
}
Hi.
I'm working on multilingual Asp.NET MVC application. In url i need to use category name.
Is there any way how to convert i.e japanese text to its url safe equivalent?
Or should i use original text in url(www.example.com/??/? = www.example.com/product/car)?
I have an application which intensively uses DB (SQL Server).
As it must have high performance I would like to know the fastest way to insert record into DB.Fastest from the standpoint of execution time.
What should I use ?
As I know the fastest way is to create stored procedure and to call it from code (ADO.NET).
Please let me know is there any better way or may be there are is some other practices to increase performance.
Here is my code:
I should get output of the department id (did) as an integer and the templatefilename (result) that is required.
The errors I get are: Conversion from string "ad" to type 'Integer' is not valid. I'm fairly new to asp.net and cannot see where the did variable picks up the "ad" string.
Any help would be greatly appreciated.
Thanks
We are getting quite a few errors in our logs where the user agent is DavCInt and verb is OPTIONS. Does anyone know who/what might be making this type of request?
We are using ASP.NET MVC and all of our controller actions are decorated with HttpGet or HttpPost as appropriate so a controller supporting the request is of course not found.
I know I can deny verbs in the web.config but I am looking for any insight before I do so.
What actually happens when you target the .NET 3.5 framework in Visual Studio? What does that actually do? Does it somehow "flag" any of the output files and associate them with the framework version?
I see a lot of exampls of how to use StructureMap in a asp.net project like this:
StructureMapConfiguration.ForRequestedType<IResourceA>()
.TheDefaultIsConcreteType<ResourceB>()
.CacheBy(InstanceScope.Singleton);
Yet, in my Global.asax I can not access the StructureMapConfiguration object even when I import the StructureMap namespace. What is the deal here? Am I missing something?