Search Results

Search found 59301 results on 2373 pages for 'asp net ajax'.

Page 91/2373 | < Previous Page | 87 88 89 90 91 92 93 94 95 96 97 98  | Next Page >

  • Asp.Net MVC Not Duplicate forms when Edit/Add

    - by Pino
    When we have anything that requires user input (Eg adding a product to a database) the Edit screen looks the same as the add screen. When using MVC .Net how do you handle this? Do you return the same view? Just adjust the model to reflect the change?

    Read the article

  • Share ASP.Net membership info between two applications

    - by bill
    Hi All, I have an existing webapp and i'm attempting to setup BlogEngine .Net to share the membership tables Everything seems to work.. accept i can see that the Membership.ValidateUser call in blogengine returns false! While the other apps returns true. I'm at a loss.. Membership.GetUser called from both apps returns the correct user.. Any ideas? thanks!

    Read the article

  • .net compact framework backward compatibility 3.5 and 2.0

    - by mack369
    Do I need to install .net 2.0 on the device, where .net 3.5 is installed? So far my application works on .net 2.0 (which potentially should be faster) but the long term plan is to port it to .net 3.5. I need to order devices and the OEM needs to know which version of .net should be add to Windows CE image (version 5.0). Shall I ask him to add both .net 2.0 and .net 3.5 ?

    Read the article

  • Asp.Net 3.5 Routing to Asmx Webservice?

    - by Maushu
    I was looking for a way to route http://www.example.com/WebService.asmx to http://www.example.com/service/ using only the ASP.NET 3.5 Routing framework without needing to configure the IIS server. Until now I have done what most tutorials told me, added a reference to the routing assembly, configured stuff in the web.config, added this to the Global.asax: protected void Application_Start(object sender, EventArgs e) { RouteCollection routes = RouteTable.Routes; routes.Add( "WebService", new Route("service/{*Action}", new WebServiceRouteHandler()) ); } ...created this class: public class WebServiceRouteHandler : IRouteHandler { public IHttpHandler GetHttpHandler(RequestContext requestContext) { // What now? } } ...and the problem is right there, I don't know what to do. The tutorials and guides I've read use routing for pages, not webservices. Is this even possible? Ps: The route handler is working, I can visit /service/ and it throws the NotImplementedException I left in the GetHttpHandler method.

    Read the article

  • Asp.net membership logout automatically

    - by alejandrobog
    Hi, I recently deploy an application that uses asp.net membership (SqlMembershipProvider) and I dont know why but it automatically log out after 1 minute of inactivity. This doesn´t happen on my development environment. I even set the userIsOnlineTimeWindow to 60 which is supposed to be in minutes. Any ideas why this is happening? Im deploying to a virtual directory on a shared hosting environment. Here is how I set up the membership provider <membership defaultProvider="FaceMoviesMembership" userIsOnlineTimeWindow="60"> <providers> <clear/> <add name="FaceMoviesMembership" type="System.Web.Security.SqlMembershipProvider" connectionStringName="FaceMoviesAuthConnectionString" enablePasswordRetrieval="true" enablePasswordReset="true" requiresQuestionAndAnswer="false" maxInvalidPasswordAttempts="10" passwordAttemptWindow="60" requiresUniqueEmail="false" passwordFormat="Clear" applicationName="FaceMoviesWeb" minRequiredPasswordLength="5" minRequiredNonalphanumericCharacters="0"/> </providers>

    Read the article

  • asp.net mvc controller actions testing

    - by Imran
    I was just wondering how others are going about testing controller actions in asp.net mvc? Most of my dependencies are injected in to my controllers so there is a not a huge amount of logic in the action methods but there may be some conditional logic for example which I think is unavoidable. In the past I have written tests for these action methods, mocked the dependencies and tested the results. I have found this is very brittle and a real PITA to maintain. Having 'Expect' and 'Stub' methods everywhere breaks very easily but I don't see any other way of testing controller actions. I actually think it might be easier to test some of these manually! Anyone have any suggestions? Perhaps I am missing something here? Thanks Imran

    Read the article

  • CompliationLock throws HttpException when registering areas for ASP.NET MVC unit tests

    - by patridge
    The moment I added a unit test to my ASP.NET MVC application to test some of the area routing, I got an HttpException coming out of the System.Web.Complication.CompilationLock type initializer with the following stack trace. System.Web.HttpException : The type initializer for 'System.Web.Compilation.CompilationLock' threw an exception. ----> System.TypeInitializationException : The type initializer for 'System.Web.Compilation.CompilationLock' threw an exception. ----> System.NullReferenceException : Object reference not set to an instance of an object. at System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() at System.Web.Compilation.BuildManager.GetReferencedAssemblies() at System.Web.Mvc.BuildManagerWrapper.System.Web.Mvc.IBuildManager.GetReferencedAssemblies() at System.Web.Mvc.TypeCacheUtil.FilterTypesInAssemblies(IBuildManager buildManager, Predicate`1 predicate) at System.Web.Mvc.TypeCacheUtil.GetFilteredTypesFromAssemblies(String cacheName, Predicate`1 predicate, IBuildManager buildManager) at System.Web.Mvc.AreaRegistration.RegisterAllAreas(RouteCollection routes, IBuildManager buildManager, Object state) at System.Web.Mvc.AreaRegistration.RegisterAllAreas(Object state) at System.Web.Mvc.AreaRegistration.RegisterAllAreas() at StpWeb.MvcApplication.RegisterRoutes(RouteCollection routes) in Global.asax.cs: line 16 at StpWeb.Tests.RoutesTest.TestFixtureSetUp() in RoutesTest.cs: line 11 --TypeInitializationException at System.Web.Compilation.CompilationLock.GetLock(ref Boolean gotLock) at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() --NullReferenceException at System.Web.Compilation.CompilationLock..cctor()

    Read the article

  • ASP.NET 3.5 Routing?

    - by Maushu
    I was looking for a way to route http://www.example.com/WebService.asmx to http://www.example.com/service/ using only the ASP.NET 3.5 Routing framework without needing to configure the IIS server. Until now I have done what most tutorials told me, added a reference to the routing assembly, configured stuff in the web.config, added this to the Global.asax: protected void Application_Start(object sender, EventArgs e) { RouteCollection routes = RouteTable.Routes; routes.Add( "WebService", new Route("service/{*Action}", new WebServiceRouteHandler()) ); } ...created this class: public class WebServiceRouteHandler : IRouteHandler { public IHttpHandler GetHttpHandler(RequestContext requestContext) { // What now? } } ...and the problem is right there, I don't know what to do. The tutorials and guides I've read use routing for pages, not webservices. Is this even possible? Ps: The route handler is working, I can visit /service/ and it throws the NotImplementedException I left in the GetHttpHandler method.

    Read the article

  • asp.net mvc create a c# class in an ascx file for design purposes

    - by Julian
    Hi, I am developing a web application using asp.net mvc. I have come across the need to Temporarily create a class in the ascx/aspx file. This class will replace the Model during the development of the page. It will also hold some test data for the user to have the chance to see some results. Once we are happy with the layout on the screen, I will inherit the correct Model class through the Control tag. Can you please advise if this is possible and how to do it? This does not work: <% class Modelo { public Guid Guid { get; set; } public string Name { get; set; } } %> Thanks in advance, Be happy - Julian

    Read the article

  • How to dispose NHibernate ISession in an ASP.NET MVC App

    - by Joe Young
    I have NHibernate hooked up in my asp.net mvc app. Everything works fine, if I DON'T dispose the ISession. I have read however that you should dispose, but when I do, I get random "Session is closed" exceptions. I am injecting the ISession into my other objects with Windsor. Here is my current NHModule: public class NHibernateHttpModule : IHttpModule { public void Init(HttpApplication context) { context.BeginRequest += context_BeginRequest; context.EndRequest += context_EndRequest; } static void context_EndRequest(object sender, EventArgs e) { CurrentSessionContext.Unbind(MvcApplication.SessionFactory); } static void context_BeginRequest(object sender, EventArgs e) { CurrentSessionContext.Bind(MvcApplication.SessionFactory.OpenSession()); } public void Dispose() { // do nothing } } Registering the ISession: container .Register(Component.For<ISession>() .UsingFactoryMethod(() => MvcApplication.SessionFactory.GetCurrentSession()).LifeStyle.Transient); The error happens when I tack the Dispose on the unbind in the module. Since I keep getting the session is closed error I assume this is not the correct way to do this, so what is the correct way? Thanks, Joe

    Read the article

  • ASP.NET authentication login and logout with browser back button

    - by Eatdoku
    Hi, I am looking for a solution for user use the browser's back button to navigate to previous page once logged out. I have a web application build in asp.net and using a custom membership provider for authentication and authorization. Everything works fine except when the user click on the logout link to log out of the application and being redirect to a default cover page, if the use click on the BACK BUTTON on their browser, it will actually go back to where they were before and the data will still show up. Of course they can't do anything on that page, click on anything link they will be redirect to a login page again. But having those information display is making a lot users confused. i am just wondering if there is any way i can either clear the browser's history so use can't go BACK, or when they click on the back button and have them redirect to the login page. thanks

    Read the article

  • Asp.Net Program Architecture

    - by Pino
    I've just taken on a new Asp.Net MVC application and after opening it up I find the following, [Project].Web [Project].Models [Project].BLL [Project].DAL Now, something thats become clear is that there is the data has to do a hell of a lot before it makes it to the View (DatabaseDALRepoBLLConvertToModelControllerView). The DAL is Subsonic, the repositorys in the DAL return the subsonic entities to the BLL which process them does crazy things and converts them into a Model (From the .Models) sometimes with classes that look like this public DataModel GetDataModel(EntityObject Src) { var ReturnData = new DataModel(): ReturnData.ID = Src.ID; ReturnDate.Name = Src.Name; //etc etc } Now, the question is, "Is this complete overkill"? Ok the project is of a decent size and can only get bigger but is it worth carrying on with all this? I dont want to use AutoMapper as it just seems like it makes the complication worse. Can anyone shed any light on this?

    Read the article

  • Determine the colours used by the ASP.NET Chart control

    - by Moose Factory
    I'd like to find out which colours are used for a particular pallette in the ASP.NET Chart control. I already know there is an enum on the Chart class to set the palette, e.g. myChart.Palette = ChartColorPalette.Berry; But I'd like to know which colours belong to the palette. Before anyone asks - as I know you will - the reason I need to know the colours is because I want to create my own legend outside of the chart image. I also know that I can set my own colours on the DataPoints for the chart, but I'd rather not have to implement my own palette.

    Read the article

  • Avoiding the Controller with Routing Rules in ASP.NET MVC

    - by Ryan Elkins
    I've created a website with ASP.NET MVC. I have a number of static pages that I am currently serving through a single controller called Home. This creates some rather ugly URLs. example.com/Home/About example.com/Home/ContactUs example.com/Home/Features You get the idea. I'd rather not have to create a controller for each one of these as the actions simply call the View with no model being passed in. Is there a way to write a routing rule that will remove the controller from the URL? I'd like it to look like: example.com/About example.com/ContactUs example.com/Features If not, how is this situation normally handled? I imagine I'm not the first person to run in to this.

    Read the article

  • Storing Interface type in ASP.NET Profile

    - by NathanD
    In my ASP.NET website all calls into the data layer return entities as interfaces and the website does not need to know what the concrete type is. This works fine, but I have run into a problem when trying to store one of those types into the user Profile. My interface implements ISerializable, like the following: public interface IInsured : IPerson, IEntity, ISerializable and the concrete type in the datalayer does implement ISerializable. My Profile property in web.config is: <add name="ActiveInsured" type="FacadeInterfaces.IInsured" serializeAs="Binary" defaultValue="[null]"/> It compiles just fine, but I get a runtime error on Profile.Save() saying that the interface cannot be serialized. I have also tried it with serializeAs="Xml". I thought that if my interface implemented ISerializable it would work. Anybody had this problem before or know of a workaround?

    Read the article

  • ASP Mail Error: The event class for this subscription is in an invalid partition

    - by JFV
    I have some ASP code that I've "inherited" from my predecessor (no, it's not an option to update it at this time...It would take an act of not only Congress, but every other foreign country too) and I'm having an issue sending mail on one of the pages. It is an almost identical code snippet from the other page, but this one throws an error when I try to 'Send'. Code below: Set myMail=CreateObject("CDO.Message") myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")=2 'Name or IP of remote SMTP server myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")="localhost" 'Server port myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25 myMail.Configuration.Fields.Update myMail.Subject="Subject" myMail.From=from_email myMail.To=email myMail.TextBody= "Body Text of message" myMail.Send The error thrown is: Error Type: (0x8004020F) The event class for this subscription is in an invalid partition I'd appreciate any and all help!!! Thanks! JFV

    Read the article

  • ASP.NET MVC 2 Areas 404

    - by Justin
    Hey, Has anyone been able to get the Areas in ASP.NET MVC 2 to work? I created a new Area called "Secure" and placed a new controller in it named HomeController. I then Created a new Home/Index.aspx view. However, when I browse to http://localhost/myapp/Secure/ it gives a 404 resource cannot be found. http://localhost/myapp/Secure/Home gives the same error. My area registration looks like this: public override void RegisterArea(AreaRegistrationContext context) { context.MapRoute( "Secure_default", "Secure/{controller}/{action}/{id}", new { action = "Index", id = UrlParameter.Optional } ); } I also tried this: public override void RegisterArea(AreaRegistrationContext context) { context.MapRoute( "Secure_default", "Secure/{controller}/{action}/{id}", new { controller = "Home", action = "Index", id = UrlParameter.Optional } ); } Thanks, Justin

    Read the article

  • ASP.NET MVC 2 - Account controller not found

    - by Chris
    Hi all, I've recently created an ASP.NET MVC 2 application, which works perfectly in the development environment. However, when I deploy it to the server (123-reg Premium Hosting), I can access all of the expected areas - except the Account controller (www.host.info/Account). This then attempts to redirect to the Error.aspx page (www.host.info/Shared/Error.aspx) which it cannot find. I've checked that all of the views have been published, and they're all in the correct place. It seems bizarre that two other controllers can be accessed with no problems, whereas the Account controller cannot be found. I have since renamed the AccountController to SecureController, and all of the dependencies, to no avail. The problem with not being able to find the Error.aspx page also occurs on the development environment. Any ideas would be greatly appreciated. Thanks, Chris

    Read the article

  • ASP.NET MVC Best Implementation Practices

    - by RSolberg
    I've recently been asked to completely rewrite and redesign a web site and the owner of the company has stressed that he wants the site to be made with the latest and greatest technology available, but to avoid additional costs. As of right now, I'm torn between looking into a CMS implementation and writing a new implementation with MVC. The site is mainly brochure ware, but will need to allow the visitors to submit some data through forms. There are quite a few lists and content features that are dynamic and should be treated as such. Since ASP.NET MVC is new, I don't want to bastardize the implementation if I go that way... Any recommendations on best implementation practices for a MVC website? Also, has anyone had their MVC implementation hosted anywhere that they would recommend?

    Read the article

  • ASP.NET MVC 2: Custom client side validation rule for dropdowns

    - by Nigel
    I have some custom validation that I need to perform that involves checking the selected option of a dropdown and flagging it as invalid should the user select a specific option. I am using ASP.NET MVC 2 and have a custom Validator and custom server side and client side validation rules as described in this blog article. The server side validation is working fine, however, the client side validation is failing. Here is the javascript validation rule: Sys.Mvc.ValidatorRegistry.validators["badValue"] = function(rule) { var badValue = rule.ValidationParameters["badValue"]; return function(value, context) { if (value != badValue) { return true; } return rule.ErrorMessage; }; }; The rule is being applied to the dropdowns successfully, and placing a breakpoint within the returned function confirms that the validation is firing, and that the 'badValue' is being correctly set. However, 'value' is always null, and so the check always fails. What am I doing wrong?

    Read the article

  • Personalization in ASP.Net MVC -- friendly URLs, and skinning

    - by larryq
    Hi everyone, I haven't delved into custom generation of friendly URLs in ASP.Net MVC, and was wondering if anyone had suggestions. For example, if John Smith were to create an account on www.example.com, I'd like for his homepage to read www.example.com/JohnSmith -- along with the option for him to choose his URL. The ideal is for this to happen with no intervention on my part in the route maps. Also, does anyone have guidelines on good ways to go to customize an MVC site based on URL? Again, using example.com I'd like for John to choose a color theme and logo for his homepage, then apply it accordingly. Thanks for your tips and suggestions.

    Read the article

  • how big should your controllers be in asp.net-mvc

    - by ooo
    i see the new feature of areas in asp.net-mvc 2. it got me thinking. why would i need this? i did some reading on the use cases and it came down to a specific point to me around how big and how broad scope should my controllers should be? should i try to have many little controllers? one big controller? how do people determine the sweet spot for number of controllers? i think mine are maybe too large (which had me questioning areas in the first place as maybe my controller name should really be an area and have a number of smaller controllers)

    Read the article

  • Asp.Net 3.5 Routing to Webservice?

    - by Maushu
    I was looking for a way to route http://www.example.com/WebService.asmx to http://www.example.com/service/ using only the ASP.NET 3.5 Routing framework without needing to configure the IIS server. Until now I have done what most tutorials told me, added a reference to the routing assembly, configured stuff in the web.config, added this to the Global.asax: protected void Application_Start(object sender, EventArgs e) { RouteCollection routes = RouteTable.Routes; routes.Add( "WebService", new Route("service/{*Action}", new WebServiceRouteHandler()) ); } ...created this class: public class WebServiceRouteHandler : IRouteHandler { public IHttpHandler GetHttpHandler(RequestContext requestContext) { // What now? } } ...and the problem is right there, I don't know what to do. The tutorials and guides I've read use routing for pages, not webservices. Is this even possible? Ps: The route handler is working, I can visit /service/ and it throws the NotImplementedException I left in the GetHttpHandler method.

    Read the article

  • asp.net membership select provider

    - by Jonesy
    Hi folks, I've done this before but can't remember how for the life of me. I used aspnetreg_sql.exe to create the membership tables in my database. But now i cant seem to be able to point my web app to the correct database. In the provider settings in asp.net management interface i only see a radio button with the label "AspNetSqlProvider" but I can only test it (in which it always fails). I can't modify the connection. Can someone help me with this? Cheers, Billy

    Read the article

  • ASP Calendar control returns Date type but I need Datetime to insert into SQL Server 2005

    - by rafael
    Hello, I am using a ASP Calendar control to insert a datetime value into a field to be part of an insert to a SQL Server 2005 db table. I get the following error when i submit the form to server and try to insert into table: [ArgumentException: The version of SQL Server in use does not support datatype 'date'.] Seems like Calendar control returns a Date type value. How could i make the Calendar control return a Datetime value instead? I know now that SQL Server 2005 does not support Date type fields.

    Read the article

< Previous Page | 87 88 89 90 91 92 93 94 95 96 97 98  | Next Page >