Search Results

Search found 64 results on 3 pages for 'rememberme'.

Page 2/3 | < Previous Page | 1 2 3  | Next Page >

  • Attach jQuery dialog to Submit button in ASP.NET-MVC

    - by RememberME
    I have a submit button which has been working to submit my form in ASP.NET-MVC. I would like to attach a jQuery dialog to the button click. If the user exits out of the dialog, then I would like to exit from the submit as well. I have dialogs hooked to other buttons, but not submits. How can I do this?

    Read the article

  • Create link on page w/ web address stored in database

    - by RememberME
    This seems like it should be easy, but I can't seem to figure it out. All of my google searches lead me to linking to databases which isn't what I want to do. I'm a complete web development newb. I've roughly followed the NerdDinner tutorial in creating my web app. One of my stored fields is a web address. On the Index and Details pages, when I display the info from my record, I want the web address to be a clickable link to the website. It's currently displayed as: <%= Html.Encode(Model.Subcontract.company1.website) %>

    Read the article

  • radiobutton checked on condition in jquery

    - by RememberME
    I have the following fields: <label>Company Type:</label> <label for="primary"><input onclick="javascript: $('#sec').hide('slow');$('#primary_company').find('option:first').attr('selected','selected');" type="radio" runat="server" name="companyType" id="primary" />Primary</label> <label for="secondary"><input onclick="javascript: $('#sec').show('slow');" type="radio" runat="server" name="companyType" id="secondary" />Secondary</label> <div id="sec"> <fieldset> <label for="primary_company">Primary Company:</label> <%= Html.DropDownList("primary_company", Model.SelectPrimaryCompanies, "** Select Primary Company **") %> </fieldset> If there is a primary_company, then the secondary radio button should be selected. If there is no primary_company, then the primary radio button should be selected. Here is my jQuery: $(document).ready(function() { if ($('#primary_company').val().length > 0) { $('#secondary').attr({ checked: true }); } else { $("#primary").attr('checked', true ); $('#sec').hide(); } The sec div hides and shows properly, but a radio button is never selected. I've tried .attr('checked', 'checked') and .attr({ checked: true }) and .attr('checked', true) but nothing is ever selected.

    Read the article

  • How to write this query in Linq2Sql

    - by RememberME
    I have a table company which holds the company_id, company_name and other details. I have a table subcontracts which has a company_id column that maps to company.company_id. How can I write a select statement to get all companies which have not been assigned to a subcontract? IE The company_id cannot be found in subcontracts.company_id

    Read the article

  • How to give user message and choice before ActionLink

    - by RememberME
    I have the following link. On click, I'd like to check the item.primary_company field and if populated, give the user a warning and ask if they would like to continue. How can I do this? <a href="<%= Url.Action("Activate", new {id = item.company_id}) %>" class="fg=button fg-button-icon-solo ui-state-default ui-corner-all"><span class="ui-icon ui-icon-refresh"></span></a>

    Read the article

  • Split string into multiple lines

    - by RememberME
    I have a long string of comments that I'd like to split into multiple lines. It's currently displayed as <%= Html.Encode(item.important_notes) %> I've played with using .Substring to split it, but can't figure out how to prevent it from splitting in the middle of a word. Instead of characters 1-100 on line 1 and 101-200 on line 2, I'd like to do something like character 1 through the last space before character 100 on line one. That character through the last space before the next 100 characters on line 2, etc. What is the best way to do this? EDIT: using ASP.NET-MVC

    Read the article

  • form submits in FireFox when any button on page is clicked

    - by RememberME
    First time using Asp.net-mvc and originally followed the NerdDinner tutorial. My form submit button looks like this: <p> <input type="submit" value="Save" /> </p> I've now added another button to the page with jQuery code attached. It works in IE, but when I test in FireFox the form submits. I tried adding another button, this time with no attached jQuery code and the same thing happens. When the button is clicked, the form submits. <button id="random-button">Do Nothing</button> ??

    Read the article

  • How to give user confirmation message before ActionLink based on validation

    - by RememberME
    I have the following link. On click, I'd like to check the item.primary_company field and if populated, give the user a warning and ask if they would like to continue. How can I do this? <a href="<%= Url.Action("Activate", new {id = item.company_id}) %>" class="fg=button fg-button-icon-solo ui-state-default ui-corner-all"><span class="ui-icon ui-icon-refresh"></span></a> EDIT I've changed to this, but nothing happens when clicked. Also, I don't know how to reference the item to do the check on the primary_company field. I only want to message to show if item.primary_company.HasValue. I'd also like to show item.company1.company_name in the confirm message. <a href="#" onclick="return Actionclick("<%= Url.Action("Activate", new {id = item.company_id}) %>");" class="fg=button fg-button-icon-solo ui-state-default ui-corner-all"><span class="ui-icon ui-icon-refresh"></span></a> <script type="text/javascript"> function Actionclick(url) { alert("myclick"); if ( confirm("Do you want to activate this company's primary company and all other subsidiaries?")) { location.href(url); } }; </script>

    Read the article

  • odd behavior when checking if radio button selected in jQuery

    - by RememberME
    I had the following check in my jQuery which I thought was working fine to see if a radio button was checked. if ($("input[@name='companyType']:checked").attr('id') == "primary") { ... } Here's the radiobuttons: <p> <label>Company Type:</label> <label for="primary"><input onclick="javascript: $('#sec').hide('slow');$('#primary_company').find('option:first').attr('selected','selected');" type="radio" name="companyType" id="primary" checked />Primary</label> <label for="secondary"><input onclick="javascript: $('#sec').show('slow');" type="radio" name="companyType" id="secondary" />Subsidiary</label> </p> Then, it suddenly stopped working (or so I thought). I did some debugging and finally realized that it was returning an id of "approved_status". Elsewhere on my form I have a checkbox called "approved_status". I realized that when I originally tested this, I must have testing it on records where approved_status is false. And, now most of my approved_statuses are true/checked. I changed the code to this: var id = $("input:radio[@name='companyType']:checked").attr('id'); alert(id); if (id == "primary") { And it's now properly returning "primary" or "secondary" as the id. So, it is working, but it seems that it's not checking the name at all and now just checking radio buttons. I just want to know for future use, what's wrong with the original code b/c I can see possibly having 2 different radio sets on a page and then my new fix probably wouldn't work. Thanks!

    Read the article

  • Problems with retrieving the correct cookie in Java

    - by Spines
    When I retrieve the cookies in my java servlet, all of the values from getPath() are null. So if a cookie with the same name is set in directory /foo, and at the root directory, I retrieve two cookies with the same exact name, but I can't differentiate them because getPath() returns null for both. I looked in firebug and saw that firefox was not sending anythign for the path. My application uses a "rememberme" cookie with the path set to "/". Everything works fine as long as there is only one cookie with name rememberme. But if somehow another cookie gets set with the same name on a different path like /foo, then my application won't know which one is the one I set for the root. How can I differentiate the cookies? Do I need to worry about a cookie existing with the same name in a subdir, or can I just assume there will be only the one I set?

    Read the article

  • JavaScript JSON Error While Tabbing in ASP.NET MVC

    - by MightyZot
    Originally posted on: http://geekswithblogs.net/MightyZot/archive/2013/11/11/javascript-json-error-while-tabbing-in-asp.net-mvc.aspxI sometimes don’t care about validation for a specific control. The RememberMe control in the login form, for example, really doesn’t need validation, so I forget to include the Html.ValidationMessageFor helper line for that control in particular. As a result, when I’m debugging using IE, I get a silly JSON parsing exception when changing focus from one field to another. The exception doesn’t hurt anything, as far as I know, but it’s just plain annoying. If you’re getting this error, and you don’t want validation messages showing up for controls on a form, you can put them in div tags and set the display style on the divs to none. When I have a handful of controls that I don’t want the validation messages for, I just throw them all in the same div and hide it.

    Read the article

  • MVC2 Controller is passed a null object as a parameter

    - by Steve Wright
    I am having an issue with a controller getting a null object as a parameter: [HttpGet] public ActionResult Login() { return View(); } [HttpPost] public ActionResult Login(LoginViewData userLogin) { Assert.IsNotNull(userLogin); // FAILS if (ModelState.IsValid) { } return View(userLogin); } The LoginViewData is being passed as null when the HttpPost is called: Using MvcContrib.FluentHtml: <h2>Login to your Account</h2> <div id="contact" class="rounded-10"> <%using (Html.BeginForm()) { %> <fieldset> <ol> <li> <%= this.TextBox(f=>f.UserLogin).Label("Name: ", "name") %> <%= Html.ValidationMessageFor(m => m.UserLogin) %> </li> <li> <%= this.Password(u => u.UserPassword).Label("Password:", "name") %> <%= Html.ValidationMessageFor(m => m.UserPassword) %> </li> <li> <%= this.CheckBox(f => f.RememberMe).LabelAfter("Remember Me")%> </li> <li> <label for="submit" class="name">&nbsp;</label> <%= this.SubmitButton("Login")%> </li> </ol> </fieldset> <% } %> <p>If you forgot your user name or password, please use the Password Retrieval Form.</p> </div> The view inherits from MvcContrib.FluentHtml.ModelViewPage and is strongly typed against the LoginViewData object: public class LoginViewData { [Required] [DisplayName("User Login")] public string UserLogin { get; set; } [Required] [DisplayName("Password")] public string UserPassword { get; set; } [DisplayName("Remember Me?")] public bool RememberMe { get; set; } } Any ideas on why this would be happening? UPDATE I rebuilt the web project from scratch and that fixed it. I am still concerned why it happened.

    Read the article

  • client side validation in ascx files (user controls) for asp.net mvc

    - by Sefer KILIÇ
    hi, I have a logOn forn in ascx files and I render it as partial. How I can add a clinet side validation to this form, have any idea ? My below code does not work <%= Html.ValidationSummary(true, "Giris basarisiz oldu. Lütfen hatalari düzeltip tekrar deneyin.") %> <% Html.EnableClientValidation(); %> <% using (Html.BeginForm("LogOnProcess", "Account")) { %> <div> <fieldset> <legend>Hesap Bilgileri</legend> <div class="editor-label"> <%= Html.LabelFor(m => m.UserName) %> </div> <div class="editor-field"> <%= Html.TextBoxFor(m => m.UserName) %> <%= Html.ValidationMessageFor(m => m.UserName) %> </div> <div class="editor-label"> <%= Html.LabelFor(m => m.Password) %> </div> <div class="editor-field"> <%= Html.PasswordFor(m => m.Password) %> <%= Html.ValidationMessageFor(m => m.Password) %> </div> <div class="editor-label"> <%= Html.CheckBoxFor(m => m.RememberMe) %> <%= Html.LabelFor(m => m.RememberMe) %> </div> <p> <input type="submit" value="Giris" /> </p> </fieldset> </div> <% } %>

    Read the article

  • Why always fires OnFailure when return View() to Ajax Form ?

    - by Wahid Bitar
    I'm trying to make a log-in log-off with Ajax supported. I made some logic in my controller to sign the user in and then return simple partial containing welcome message and log-Off ActionLink my Action method looks like this : public ActionResult LogOn(LogOnModel model, string returnUrl) { if (ModelState.IsValid) { if (MembershipService.ValidateUser(model.UserName, model.Password)) { FormsService.SignIn(model.UserName, model.RememberMe); if (Request.IsAjaxRequest()) { //HERE IS THE PROBLEM :( return View("LogedInForm"); } else { if (!String.IsNullOrEmpty(returnUrl)) return Redirect(returnUrl); else return RedirectToAction("Index", "Home"); } } else { ModelState.AddModelError("", "The user name or password provided is incorrect."); if (Request.IsAjaxRequest()) { return Content("There were an error !"); } } } return View(model); } and I'm trying to return this simple partial : Welcome <b><%= Html.Encode(Model.UserName)%></b>! <%= Html.ActionLink("Log Off", "LogOff", "Account") %> and of-course the two partial are strongly-typed to LogOnModel. But if i returned View("PartialName") i always get OnFailure with status code 500. While if i returned Content("My Message") everything is going right. so please tell me why i always get this "StatusCode = 500" ??. where is the big mistake ??. By the way in my Site MasterPage i rendered partial to show long-on simple form this partial looks like this : <script type="text/javascript"> function ShowErrorMessage(ajaxContext) { var response = ajaxContext.get_response(); var statusCode = response.get_statusCode(); alert("Sorry, the request failed with status code " + statusCode); } function ShowSuccessMessage() { alert("Hey everything is OK!"); } </script> <div id="logedInDiv"> </div> <% using (Ajax.BeginForm("LogOn", "Account", new AjaxOptions { UpdateTargetId = "logedInDiv", InsertionMode = InsertionMode.Replace, OnSuccess = "ShowSuccessMessage", OnFailure = "ShowErrorMessage" })) { %> <%= Html.TextBoxFor(m => m.UserName)%> <%= Html.PasswordFor(m => m.Password)%> <%= Html.CheckBoxFor(m => m.RememberMe)%> <input type="submit" value="Log On" /> < <% } %>

    Read the article

  • DotNetOpenAuth Remember Me

    - by user300992
    I am using OpenIdLogin (with OpenIdButton) control on my login page, I noticed that there are properties "RememberMe", "RememberMeText" and "RememberMeVisible". However I can't get it to work, is there any example? Say, after the user logged on to my site successufully via Google, the user then decided to close the browser. If the user launch a new browser again, the user should not have to type the login/password again, right? Thanks for help

    Read the article

  • ASP.NET Membership API not working on Win2008 server/IIS7

    - by Program.X
    I have a very odd problem. I have a web app that uses the .NET Membership API to provide login functionality. This works fine on my local dev machine, using WebDev 4.0 server. I'm using .NET 4.0 with some URL Rewriting, but not on the pages where login is required. I have a Windows Server 2008 with IIS7 However, the Membership API seemingly does not work on the server. I have set up remote debugging and the LoginUser.LoggedIn event of the LoginUser control gets fired okay, but the MembershipUser is null. I get no answer about the username/password being invalid so it seems to be recognising it. If I enter an invalid username/password, I get an invalid username/password response. Some code, if it helps: <asp:ValidationSummary ID="LoginUserValidationSummary" runat="server" CssClass="validation-error-list" ValidationGroup="LoginUserValidationGroup"/> <div class="accountInfo"> <fieldset class="login"> <legend>Account Information</legend> <p> <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">Username:</asp:Label> <asp:TextBox ID="UserName" runat="server" CssClass="textEntry"></asp:TextBox> <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName" CssClass="validation-error" Display="Dynamic" ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="LoginUserValidationGroup">*</asp:RequiredFieldValidator> </p> <p> <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label> <asp:TextBox ID="Password" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox> <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password" CssClass="validation-error" Display="Dynamic" ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="LoginUserValidationGroup">*</asp:RequiredFieldValidator> </p> <p> <asp:CheckBox ID="RememberMe" runat="server"/> <asp:Label ID="RememberMeLabel" runat="server" AssociatedControlID="RememberMe" CssClass="inline">Keep me logged in</asp:Label> </p> </fieldset> <p class="login-action"> <asp:Button ID="LoginButton" runat="server" CommandName="Login" CssClass="submitButton" Text="Log In" ValidationGroup="LoginUserValidationGroup"/> </p> and the code behind: protected void Page_Load(object sender, EventArgs e) { LoginUser.LoginError += new EventHandler(LoginUser_LoginError); LoginUser.LoggedIn += new EventHandler(LoginUser_LoggedIn); } void LoginUser_LoggedIn(object sender, EventArgs e) { // this code gets run so it appears logins work Roles.DeleteCookie(); // this behaviour has been removed for testing - no difference } void LoginUser_LoginError(object sender, EventArgs e) { HtmlGenericControl htmlGenericControl = LoginUser.FindControl("errorMessageSpan") as HtmlGenericControl; if (htmlGenericControl != null) htmlGenericControl.Visible = true; } I have "Fiddled" with the Login form reponse and I get the following Cookie-Set headers: Set-Cookie: ASP.NET_SessionId=lpyyiyjw45jjtuav1gdu4jmg; path=/; HttpOnly Set-Cookie: .ASPXAUTH=A7AE08E071DD20872D6BBBAD9167A709DEE55B352283A7F91E1066FFB1529E5C61FCEDC86E558CEA1A837E79640BE88D1F65F14FA8434AA86407DA3AEED575E0649A1AC319752FBCD39B2A4669B0F869; path=/; HttpOnly Set-Cookie: .ASPXROLES=; expires=Mon, 11-Oct-1999 23:00:00 GMT; path=/; HttpOnly I don't know what is useful here because it is obviously encrypted but I find the .APXROLES cookie having no value interesting. It seems to fail to register the cookie, but passes authentication

    Read the article

  • How to include the login form on the Home index page in MVC

    - by Bernard Larouche
    Hi guys I really need your help for this. I am relatively new to programming and I need help to something that could be easy for a experienced programmer. I would like to get the login form that we get for free in an MVC application on the left sidebar of my Home index page instead of the usual Account/Login page. I am facing some problems. First I need a product object to be displayed on my Home Index page as well. What I did is that I added a product object to the LogOnModel that they provide in the AccountModels class and I created a UserControl (partial view) copying the content of the LogOn.aspx view. Now my Home index.aspx as well as my partial view inherits the LogOnModel class. I can see the Login form on my Home Index page as well as my product object BUT the login Form is never empty. The last username and password always appear there. I know I must have forgotten something or have done something wrong or the way did it is completely wrong !! Please could you give me some advice Thks <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<CoderForTradersSite.Models.LogOnModel>" %> <h4>Login Form</h4> <p> Please enter your username and password. <%= Html.ActionLink("Register", "Register") %> if you don't have an account. </p> <% using (Html.BeginForm()) { %> <%= Html.ValidationSummary(true, "Login was unsuccessful. Please correct the errors and try again.") %> <div> <fieldset> <legend>Account Information</legend> <div class="editor-label"> <%= Html.LabelFor(m => m.UserName) %> </div> <div class="editor-field"> <%= Html.TextBoxFor(m => m.UserName) %> <%= Html.ValidationMessageFor(m => m.UserName) %> </div> <div class="editor-label"> <%= Html.LabelFor(m => m.Password) %> </div> <div class="editor-field"> <%= Html.PasswordFor(m => m.Password) %> <%= Html.ValidationMessageFor(m => m.Password) %> </div> <div class="editor-label"> <%= Html.CheckBoxFor(m => m.RememberMe) %> <%= Html.LabelFor(m => m.RememberMe) %> </div> <p> <input type="submit" value="Log On" /> </p> </fieldset> </div> <% } %>

    Read the article

  • ASP.NET MVC - HttpPost to ReturnURL after redirect

    - by JP
    Hello, I am writing an ASP.NET MVC 2.0 application which requires users to log in before placing a bid on an item. I am using an actionfilter to ensure that the user is logged in and, if not, send them to a login page and set the return url. Below is the code i use in my action filter. if (!filterContext.HttpContext.User.Identity.IsAuthenticated) { filterContext.Result = new RedirectResult(String.Concat("~/Account/LogOn","?ReturnUrl=",filterContext.HttpContext.Request.RawUrl)); return; } In my logon controller I validate the users credentials then sign them in and redirect to the return url FormsAuth.SignIn(userName, rememberMe); if (!String.IsNullOrEmpty(returnUrl)) { return Redirect(returnUrl); } My problem is that this will always use a Get (HttpGet) request whereas my original submission was a post (HttpPost) and should always be a post. Can anyone suggest a way of passing this URL including the HttpMethod or any workaround to ensure that the correct HttpMethod is used? Thanks in advance, JP

    Read the article

  • DefaultHttpClient GET and POST commands Java Android

    - by RenegadeAndy
    Ok this is my application : An Android app to allow me to submit CokeZone codes into CokeZone.co.uk from a mobile app instead of from the website. So I wrote this section of code to do the post logon command and then check to see if im logged in after. Problem is - the html I get from the homepage after I send the post command is the default - as if im not logged in - so something is going wrong. Can anyone please help! Its probably the URL im sending the POST to, or the params within the POST command - I havent done much of this stuff so its probably something obvious. Below is my code so far: DefaultHttpClient httpclient = new DefaultHttpClient(); HttpGet httpget = new HttpGet(url); HttpResponse response = httpclient.execute(httpget); HttpEntity entity = response.getEntity(); thisResponse = printPage(entity.getContent()); Log.e("debug",thisResponse); System.out.println("Login form get: " + response.getStatusLine()); if (entity != null) { entity.consumeContent(); } System.out.println("Initial set of cookies:"); List<Cookie> cookies = httpclient.getCookieStore().getCookies(); if (cookies.isEmpty()) { System.out.println("None"); } else { for (int i = 0; i < cookies.size(); i++) { System.out.println("- " + cookies.get(i).toString()); } } HttpPost httpost = new HttpPost("https://secure.cokezone.co.uk/home/blank.jsp?_DARGS=/home/login/login.jsp"); List <NameValuePair> nvps = new ArrayList <NameValuePair>(); nvps.add(new BasicNameValuePair("_dyncharset", "ISO-8859-1")); nvps.add(new BasicNameValuePair("/grlp/login/LoginHandler.loginFormBean.name","renegadeandy%40gmail.com")); nvps.add(new BasicNameValuePair("_D:/grlp/login/LoginHandler.loginFormBean.name", "+")); nvps.add(new BasicNameValuePair("/grlp/login/LoginHandler.cookiedUser", "false")); nvps.add(new BasicNameValuePair("_D:/grlp/login/LoginHandler.cookiedUser", "+")); nvps.add(new BasicNameValuePair("/grlp/login/LoginHandler.loginFormBean.password", "passwordval")); nvps.add(new BasicNameValuePair("_D:/grlp/login/LoginHandler.loginFormBean.password", "+")); nvps.add(new BasicNameValuePair("/grlp/login/LoginHandler.rememberMe", "yes")); nvps.add(new BasicNameValuePair("_D:/grlp/login/LoginHandler.rememberMe", "false")); nvps.add(new BasicNameValuePair("/grlp/login/LoginHandler.aSuccessURL", "http://www.cokezone.co.uk/home/index.jsp")); nvps.add(new BasicNameValuePair("_D:/grlp/login/LoginHandler.aSuccessURL", "+")); nvps.add(new BasicNameValuePair("/grlp/login/LoginHandler.aErrorURL", "http://www.cokezone.co.uk/home/index.jsphttps://secure.cokezone.co.uk/home/index.jsp")); nvps.add(new BasicNameValuePair("/grlp/login/LoginHandler.aErrorURL", "+")); nvps.add(new BasicNameValuePair("/grlp/login/LoginHandler.explicitLogin", "true")); nvps.add(new BasicNameValuePair("_D:/grlp/login/LoginHandler.explicitLogin", "+")); nvps.add(new BasicNameValuePair("/grlp/login/LoginHandler.fICLogin", "login")); nvps.add(new BasicNameValuePair("_D:/grlp/login/LoginHandler.fICLogin", "+")); nvps.add(new BasicNameValuePair("/grlp/login/LoginHandler.fICLogin", "LOGIN")); nvps.add(new BasicNameValuePair("_D:/grlp/login/LoginHandler.fICLogin", "+")); nvps.add(new BasicNameValuePair("_DARGS", "/home/login/login.jsp")); httpost.setEntity(new UrlEncodedFormEntity(nvps, HTTP.UTF_8)); response = httpclient.execute(httpost); entity = response.getEntity(); System.out.println("Login form get: " + response.getStatusLine()); if (entity != null) { thisResponse = printPage(entity.getContent()); entity.consumeContent(); } Log.e("debug",thisResponse); Log.e("debug","done"); httpget = new HttpGet("http://www.cokezone.co.uk/home/index.jsp"); response = httpclient.execute(httpget); entity = response.getEntity(); TextView points = (TextView)findViewById(R.id.points); points.setText(getPoints(entity.getContent()).toString()); debug.setText(thisResponse); System.out.println("Post logon cookies:"); cookies = httpclient.getCookieStore().getCookies(); if (cookies.isEmpty()) { System.out.println("None"); } else { for (int i = 0; i < cookies.size(); i++) { System.out.println("- " + cookies.get(i).toString()); } }

    Read the article

  • Can't explain why not redirecting after login using RedirectFromLogin

    - by Blankman
    I am using ASP.NET MVC, on my login action I am doing: [AcceptVerbs("POST")] public ActionResult Login(FormCollection form) { User validatedUser = // tests username/pwd here. FormsAuthentication.RedirectFromLoginPage( validatedUser.ID.ToString(), rememberMe); if(String.IsNullOrEmpty(Request["ReturnUrl"])) string redirectUrl = Request["ReturnUrl"]; if (!String.IsNullOrEmpty(Request.QueryString["ReturnUrl"])) string redirectUrl = Request["ReturnUrl"]; } My url looks like this when I am on the login page: http://localhost:56112/user/login?ReturnUrl=/admin/settings Does anything look wrong here? My web.config: <authentication mode="Forms"> <forms loginUrl="/user/login" protection="All" timeout="30" name="SomeCookie" requireSSL="false" slidingExpiration="true" defaultUrl="default.aspx" />

    Read the article

  • ASP.NET MVC SSL POST Error

    - by RyanFetz
    I have a Logon page in a MVC (1.0) application that I am securing with SSL, I have an attribute that inspects the request for the page and redirects to a https uri when it is requested with http. This all works, however when I post the form content i get the following error: The parameters dictionary contains a null entry for parameter 'rememberMe' of non-nullable type 'System.Boolean' for method 'System.Web.Mvc.ActionResult LogOn(System.String, System.String, Boolean, System.String)' in 'DAC.US.Web.Portal.Controllers.AccountController'. To make a parameter optional its type should be either a reference type or a Nullable type. Parameter name: parameters here is the controller code... // // GET: /Account/LogOn [RequiresSSL] public ActionResult LogOn(string ReturnUrl) { if (TempData["Message"] != null) ViewData["Message"] = TempData["Message"]; TempData["Message"] = null; ViewData["ReturnUrl"] = ReturnUrl ?? "/Home"; return View(); } Again, the RequireSSL Attribute works, but the POST from that SSL uri does not. What is not working?

    Read the article

  • How can I login in a website with Pyhon?

    - by Shady
    How can I do it? I was trying to enter some specified link (with urllib), but to do it, I need to log. I have this source from the site <form id="login-form" action="auth/login" method="post"> <div> <!--label for="rememberme">Remember me</label><input type="checkbox" class="remember" checked="checked" name="remember me" /--> <label for="email" id="email-label" class="no-js">Email</label> <input id="email-email" type="text" name="handle" value="" autocomplete="off" /> <label for="combination" id="combo-label" class="no-js">Combination</label> <input id="password-clear" type="text" value="Combination" autocomplete="off" /> <input id="password-password" type="password" name="password" value="" autocomplete="off" /> <input id="sumbitLogin" class="signin" type="submit" value="Sign In" /> It's possible?

    Read the article

  • How can I login to a website with Python?

    - by Shady
    How can I do it? I was trying to enter some specified link (with urllib), but to do it, I need to log in. I have this source from the site: <form id="login-form" action="auth/login" method="post"> <div> <!--label for="rememberme">Remember me</label><input type="checkbox" class="remember" checked="checked" name="remember me" /--> <label for="email" id="email-label" class="no-js">Email</label> <input id="email-email" type="text" name="handle" value="" autocomplete="off" /> <label for="combination" id="combo-label" class="no-js">Combination</label> <input id="password-clear" type="text" value="Combination" autocomplete="off" /> <input id="password-password" type="password" name="password" value="" autocomplete="off" /> <input id="sumbitLogin" class="signin" type="submit" value="Sign In" /> Is this possible?

    Read the article

  • I'm looking for a program that can automate opening/closing a program

    - by Peterstone
    I am looking a for a program to remember things with these features: Open files or programs in my own computer at a planned time. For example I want every morming at 8:00 the program open a particular mp3 file. But suposse, by mistake, that I on my computer and 9:00, then I want that the program rememberme what I planned to open at 8:00. Show me the program as an active windows on my desktop. The windows of the program opened is what the user is seeing (Is at the first place in the desktop) and the rest of the program windows are below. Close programs or files in my own computer at a planned time. For example I want that the program mp3 file that was opened at 8:00 was closed at 10:00 if at that time still be opened. Detection of events. For instance If I open particular videogame program. then a mp3 file (with a recording message arguing why I shouldn´t continue playing that videogame at work time) is opened. Possibility of combine the features mentioned before each other.

    Read the article

< Previous Page | 1 2 3  | Next Page >