Search Results

Search found 3 results on 1 pages for 'liado'.

Page 1/1 | 1 

  • How do i set focus to a text box Html.TextBoxFor - mvc 2

    - by Liado
    Hi, I'm trying to set focus on a text box which generated in the following way: <%=Html.TextBoxFor(model = model.Email, new { style = "width:190px;Border:0px", maxsize = 190 })% i tried to use javascript which didnt help much. var txtBox = document.getElementById("Email"); if (txtBox != null) txtBox.focus(); Can someone help? Thanks.

    Read the article

  • Validation errors are visible when I access the page before I post the form

    - by Liado
    Hi, I have html validation using client side and server side validation. The problem is when I open the page the validation text is visible before I fill in the text box and post the form. What can I do the solve this issue? I'm using the following code: <script src="/Scripts/jquery-1.4.1.min.js" type="text/javascript"></script> <script src="/Scripts/jquery.validate.js" type="text/javascript"></script> <script src="/Scripts/MicrosoftMvcJQueryValidation.js" type="text/javascript"></script> <% Html.EnableClientValidation(); %> <% using (Html.BeginForm()) {%> <%=Html.TextBox("Email", null, new { style = "width:190px;Border:0px", maxsize = 190 })%> <%=Html.ValidationMessage("SingMeUp", "Invalid e-mail address.", new { @class = "Email_Validation_Error_Location_OverLoad", style = "float:left" })%>

    Read the article

  • Writing text file on local server MVC 2.0

    - by Liado
    Hi, i'm trying to write a text file on remote server, i'm using the following code: [AcceptVerbs(HttpVerbs.Post)] public ActionResult Index(UserModels model) { if (!ModelState.IsValid) { return View("Index"); } try { using (StreamWriter w = new StreamWriter(Server.MapPath(TEXT_FILE_NAME), true)) { w.WriteLine(model.Email.ToString()); // Write the text } } catch { } the folder is still empty, can someone help? what should be the problem? Thanks

    Read the article

1