Daily Archives

Articles indexed Saturday April 3 2010

Page 19/78 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • Troubleshooting: Monitor never turns on, system fans running, DVD-ROM does not open.

    - by Wesley
    Hi all, Here are my specs beforehand: ECS P4VXASD2+ (V5.0) motherboard FSB 533MHz Intel Pentium 4 2.40A GHz Prescott Socket 478 2x 256MB PC2100 DDR RAM, 2x 256MB PC133 SDRAM CoolMax 350W PSU DVD-ROM - will edit with brand & model 128MB ATi Radeon 9800 Pro AGP No hard drive So, I just put those parts together today and I tried to power it up, with the monitor connected to the Radeon 9800 in the AGP slot (mobo does not have VGA port). After turning it on, the CPU fan, graphics fan and system fan go on. However, the monitor remains in standby mode, despite being plugged in. Also, after pushing the button on the DVD-ROM drive, it does not open. I've used the DVD-ROM drive before with absolutely no issues. The graphics card was slightly buggy when I put it on another machine, which was left outside in winter weather for 3 months. (Still that computer's integrated graphics worked fine.) CMOS battery was replaced and jumpers are all set correctly. Now, I'm wondering whether the motherboard, CPU, PSU or GPU is the problem. What can I do to test which part is the problem? Just to clarify, I don't have a hard drive, so I usually boot Ubuntu from the disc drive. Anyways, thanks in advance!

    Read the article

  • Urlredirect in MVC2

    - by Ken
    In global.asax routes.MapRoute( "Test_Default", // Route name "test/{controller}/{action}", // URL with parameters new { } ); routes.MapRoute( "Default", "{universe}", new { controller = "notfound", action = "error"} ); I have a controller: Home, containing an action: Index Enter the url in browser: h**p://localhost:53235/test/home/index Inside the index.aspx view in <body> tag: I want to link to the second route. <%=Html.RouteLink("Link", new { universe = "MyUniverse" })%> Shouldn't this generate a link to the second route in Global.asax? The generated url from the above is: h**p://localhost:53235/test/home/index?universe=MyUniverse. I can only get it to work, if I specify the name of the route: <%=Html.RouteLink("Link", "default", new { universe = "MyUniverse" })%> Am I missing something?

    Read the article

  • ASP.NET - working with GridView Programmatically

    - by JMSA
    I am continuing from this post. After much Googling, I have come up with this code to edit cells programmatically: using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using Ice_Web_Portal.BO; namespace GridView___Test { public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { GridView1.DataSource = Course.GetCourses(); GridView1.DataBind(); } protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e) { GridViewRow row = GridView1.Rows[e.NewEditIndex]; GridView1.EditIndex = e.NewEditIndex; GridView1.DataSource = Course.GetCourses(); GridView1.DataBind(); } protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e) { TextBox txtID = (TextBox)GridView1.Rows[e.RowIndex].Cells[1].Controls[0]; TextBox txtCourseCode = (TextBox)GridView1.Rows[e.RowIndex].Cells[2].Controls[0]; TextBox txtCourseName = (TextBox)GridView1.Rows[e.RowIndex].Cells[3].Controls[0]; TextBox txtCourseTextBookCode = (TextBox)GridView1.Rows[e.RowIndex].Cells[4].Controls[0]; Course item = new Course(); item.ID = Convert.ToInt32(txtID.Text); item.CourseCode = txtCourseCode.Text; item.CourseName = txtCourseName.Text; item.TextBookCode = txtCourseTextBookCode.Text; bool success = Course.Update(item); labMessage.Text = success.ToString(); GridView1.EditIndex = -1; GridView1.DataSource = Course.GetCourses(); GridView1.DataBind(); } } } But 2 problems are happening. (1) I need to press command buttons twice to Edit/Update. (2) Changes in the cell values are not updated in the database. I.e. edited cell values are not committing. Can anyone give me a solution?

    Read the article

  • Is there an event that raises after a View/PartialView executes in ASP.NET MVC 2 RC2?

    - by sabanito
    I have the following problem: We have an ASP.NET MVC 2 RC 2 application that programmatically impersonates an AD Account that the user specifies at logon. This account is used to access the DB. At first we had the impersonating code in the begin_request and we were undoing the impersonation at the end_request, but when we tried to use IIS 7.5 in integrated mode, we learned that it's not possible to impersonate in the Global.asax so we tried different things. We have succesfully moved our code from the BeginRequest to the ActionExecuting event and the EndRequest to the ResultExecuted, and now, about 80% of our code works. We've just discovered that since we're passing the Entity Framework objects as models for our views, there's this remaining 20% that won't work because some Navigation Properties are not loaded when the view begins it's execution, so we're getting connection exceptions from Sql Server. Is there any event or method that executes AFTER the view, so we can undo the impersonation in it? We thought ResultExecuted will do just that, but it doesn't. We've been told that passing the plain Entities into the view as models is not a good idea, but we have A LOT of views that may have this problem and there's not automated way to know it. If some of you could explain why it's not a good idea, maybe we can convince the team to fix it!

    Read the article

  • Validate MVC 2 form using Data annotations and Linq-to-SQL, before the model binder kicks in (with D

    - by Stefanvds
    I'm using linq to SQL and MVC2 with data annotations and I'm having some problems on validation of some types. For example: [DisplayName("Geplande sessies")] [PositiefGeheelGetal(ErrorMessage = "Ongeldige ingave. Positief geheel getal verwacht")] public string Proj_GeplandeSessies { get; set; } This is an integer, and I'm validating to get a positive number from the form. public class PositiefGeheelGetalAttribute : RegularExpressionAttribute { public PositiefGeheelGetalAttribute() : base(@"\d{1,7}") { } } Now the problem is that when I write text in the input, I don't get to see THIS error, but I get the errormessage from the modelbinder saying "The value 'Tomorrow' is not valid for Geplande sessies." The code in the controller: [HttpPost] public ActionResult Create(Projecten p) { if (ModelState.IsValid) { _db.Projectens.InsertOnSubmit(p); _db.SubmitChanges(); return RedirectToAction("Index"); } else { SelectList s = new SelectList(_db.Verbonds, "Verb_ID", "Verb_Naam"); ViewData["Verbonden"] = s; } return View(); } What I want is being able to run the Data Annotations before the Model binder, but that sounds pretty much impossible. What I really want is that my self-written error messages show up on the screen. I have the same problem with a DateTime, which i want the users to write in the specific form 'dd/MM/yyyy' and i have a regex for that. but again, by the time the data-annotations do their job, all i get is a DateTime Object, and not the original string. So if the input is not a date, the regex does not even run, cos the data annotations just get a null, cos the model binder couldn't make it to a DateTime. Does anyone have an idea how to make this work?

    Read the article

  • Eclipse script for commit on close?

    - by Peter Nguyen
    Hi, I was wondering how to create a Eclipse script (Eclipsemonkey) to commit the current project on closing of Eclipse? You can listen to commands such as "org.eclipse.ui.file.save" (on file save) etc. but what's the command for editor closing? And how can you call a commit action?

    Read the article

  • Why is TortoiseSVN so slow?

    - by Zack Peterson
    I'm using TortoiseSVN to connect to my Subversion repository hosted with CVSDude. It's unreasonably slow--especially on small transfers... 5 kBytes transferred in 5 minute(s) and 9 second(s)?! It's not just slow to respond, though. It bogs the computer down for 5 minutes while processing those 5 kilobytes. Could there possibly be anything wrong with my installation or settings? Or, is the blame purely with my Subversion host, CVSDude?

    Read the article

  • Javascript top banner control [closed]

    - by Mike Pateras
    Possible Duplicates: How to show popup message like in stackoverflow Header message just like at Stack Overflow How to display a message on screen without refreshing like SO does? I'm looking for something like StackOverflow's banner that pops up (or rather drops down) from the top of the screen when you have a new alert. Preferably some javascript widget, though I'd be open to anything that will work with an ASP.Net MVC2 web page. All I'm looking for is a simple top-banner alert/message that looks good, preferably with a cancel button. Is there something like that, freely available?

    Read the article

  • LINQ self referencing query

    - by Chris
    I have the following SQL query: select p1.[id], p1.[useraccountid], p1.[subject], p1.[message], p1.[views], p1.[parentid], case when p2.[created] is null then p1.[created] else p2.[created] end as LastUpdate from forumposts p1 left join ( select parentid, max(created) as [created] from forumposts group by parentid ) p2 on p2.parentid = p1.id where p1.[parentid] is null order by LastUpdate desc Using the following class: public class ForumPost : PersistedObject { public int Views { get; set; } public string Message { get; set; } public string Subject { get; set; } public ForumPost Parent { get; set; } public UserAccount UserAccount { get; set; } public IList<ForumPost> Replies { get; set; } } How would I replicate such a query in LINQ? I've tried several variations, but I seem unable to get the correct join syntax. Is this simply a case of a query that is too complicated for LINQ? Can it be done using nested queries some how? The purpose of the query is to find the most recently updated posts i.e. replying to a post would bump it to the top of the list. Replies are defined by the ParentID column, which is self-referencing.

    Read the article

  • ASP.NET MVC2 RC : How to intercept or trigger client-side validation before ajax request?

    - by jacko
    I have a username textbox on a form, that has a few validation rules applied to it via the DataAnnotation attributes: [Required(ErrorMessage = "FTP login is required")] [StringLength(15, ErrorMessage = "Must be 15 characters or fewer")] [RegularExpression(@"[a-zA-Z0-9]*", ErrorMessage = "Alpha-numeric characters only")] public string FtpLogin { get; set; } I also have a button next to this text box, that fires off a jQuery ajax request that checks for the existence of the username as follows: <button onclick="check(this);return false;" id="FtpLoginCheck" name="FtpLoginCheck">Available?</button> I'm looking for a way of tieing the two together, so that the client-side validation is performed before the call to the "check(this)" in the onclick event. Edit: To be more clear, I need a way to inspect or trigger the client-side validation result of the textbox, when I click the unrelated button beside it. Edit: I now have the button JS checking for $("form").validate().invalid, but not displaying the usual validation messages. Almost there Any ideas?

    Read the article

  • Windows Server 2003 Hacked - Files Being Uploaded

    - by jreedinc
    Blank directories are being created on my Windows Server 2003 virtual server with sub directories that are weird (for example: "88ÿ ÿ ÿÿþþ þþ13þ"). It looks like they are uploading bootlegged DVDs and pirated software. All of my bandwidth and file space is being eaten up. Could this be a shared permissions issue? Where should I look to further investigate this? My security permissions for the directory that is being hit are as followed: Administrators - ALL GRANTED IIS_WPG - Read & Execute, List Folder Contents, Read Internet Guest - DENY SYSTEM - ALL GRANTED Users - Read & Execute, List Folder Contents, Read My Event Viewer is showing many Logon/Logoff with NO IP?

    Read the article

  • How to display and update data in MVC2

    - by Picflight
    Table Product Product Id Product Name Table ProductSupplier ProductSupplierId ProductId SupplierId Table Supplier SupplierId SupplierName I have the above 3 tables in my database, ProductSupplier is the lookup table. Each Product can have many suppliers. I am using Entity Framework. Using Web Forms it was fairly easy to display a Product on a web page and bind a repeater with the suppliers information. Also, with Web Forms it was easy to Add new Product and suppliers, the linkage seemed easy. How do you do this sort of functionality in MVC? In the Create View below, I want to be able to Add the Supplier as well. Is there a better approach that I might be missing here? This is how I did it with Web Forms. Beyond the code below I am totally lost. I can show data in a list and also display the Suppliers for each Product, but how do I Add and Edit. Should I break it into different views? With Web Forms I could do it all in one page. namespace MyProject.Mvc.Models { [MetadataType(typeof(ProductMetaData))] public partial class Product { public Product() { // Initialize Product this.CreateDate = System.DateTime.Now; } } public class ProductMetaData { [Required(ErrorMessage = "Product name is required")] [StringLength(50, ErrorMessage = "Product name must be under 50 characters")] public object ProductName { get; set; } [Required(ErrorMessage = "Description is required")] public object Description { get; set; } } public class ProductFormViewModel { public Product Product { get; private set; } public IEnumerable<ProductSupplier> ProductSupplier { get; private set; } public ProductFormViewModel() { Product = new Product(); } public ProductFormViewModel(Product product) { Product = product; ProductSupplier = product.ProductSupplier; } } } ProductRepository public Product GetProduct(int id) { var p = db.Product.FirstOrDefault(por => por.ProductId == id); p.ProductSupplier.Attach(p.ProductSupplier.CreateSourceQuery().Include("Product").ToList()); return p; } Product Create View <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MyProject.Mvc.Models.ProductFormViewModel>" %> <%= Html.ValidationSummary("Please correct the errors and try again.") %> <% using (Html.BeginForm()) {%> <fieldset> <legend>Fields</legend> <div class="editor-label"> <%= Html.LabelFor(model => model.Product.ProductId) %> </div> <div class="editor-field"> <%= Html.TextBoxFor(model => model.Product.ProductId) %> <%= Html.ValidationMessageFor(model => model.Product.ProductId) %> </div> <div class="editor-label"> <%= Html.LabelFor(model => model.Product.ProductName) %> </div> <div class="editor-field"> <%= Html.TextBoxFor(model => model.Product.ProductName) %> <%= Html.ValidationMessageFor(model => model.Product.ProductName) %> </div> <div class="editor-label"> <%= Html.LabelFor(model => model.Product.Description) %> </div> <div class="editor-field"> <%= Html.TextBoxFor(model => model.Product.Description) %> <%= Html.ValidationMessageFor(model => model.Product.Description) %> </div> <p> <input type="submit" value="Create" /> </p> </fieldset> <% } %>

    Read the article

  • maxlength attribute of a text box from the DataAnnotations StringLength in MVC2

    - by Pervez Choudhury
    I am working on an MVC2 application and want to set the maxlength attributes of the text inputs. I have already defined the stringlength attribute on the Model object using data annotations and it is validating the length of entered strings correctly. I do not want to repeat the same setting in my views by setting the max length attribute manually when the model already has the information. Is there any way to do this? Code snippets below: From the Model: [Required, StringLength(50)] public string Address1 { get; set; } From the View: <%= Html.LabelFor(model => model.Address1) %> <%= Html.TextBoxFor(model => model.Address1, new { @class = "text long" })%> <%= Html.ValidationMessageFor(model => model.Address1) %> What I want to avoid doing is: <%= Html.TextBoxFor(model => model.Address1, new { @class = "text long", maxlength="50" })%> Is there any way to do this?

    Read the article

  • Is there a way to update a ViewModel in MVC2?

    - by Juvaly
    This code works: [HttpPost] public ActionResult Edit(int id, FormCollection fc) { Movie movie = ( from m in _ctx.Movie.Include("MovieActors") where m.MovieID == id select m ).First(); MovieActorViewModel movieActor = new MovieActorViewModel(movie); if (TryUpdateModel(movieActor)) { _ctx.ApplyPropertyChanges(movieActor.Movie.EntityKey.EntitySetName, movieActor.Movie); _ctx.SaveChanges(); } return View(movieActor); } However, I am not sure how to test this, and in general would much rather have the method take a typed model like: [HttpPost] public ActionResult Edit(MovieActorViewModel movieActor) Is this possible? What changes to my MovieActorViewModel class do I need to make in order to enable this? That class looks like this: public class MovieActorViewModel { public Movie Movie { get; set; } public Actor Actor { get; set; } public PublisherDealViewModel(Movie movie) { this.Movie = movie; this.Actor = ( from a in this.Movie.Actors where a.ActorID == 1 select a ).First(); } } The view is typed (inherits ViewPage) simple: <% using (Html.BeginForm()) {%> Movie Title: <%= Html.TextBoxFor(model=>model.Movie.Title) %><br/> Actor Name: <%= Html.TextBoxFor(model=>model.Actor.Name) %> <% } %>

    Read the article

  • Mercurial Remote Subrepos

    - by Travis G
    I'm trying to set up my Mercurial repository system to work with multiple subrepos. I've basically followed these instructions to set up the client repo with Mercurial client v1.5 and I'm using HgWebDir to host my multiple projects. I have an HgWebDir with the following structure: http://myserver/hg fooproj mylib where mylib is some collection of common template library to be consumed by fooproj. The structure of fooproj looks like this: fooproj doc/ src/ .hgignore .hgsub .hgsubstate And .hgsub looks like: src/mylib = http://myserver/hg/mylib This should work, per my interpretation of the documentation: The first 'nested' is the path in our working dir, and the second is a URL or path to pull from. So, let's say I pull down fooproj to my home folder with: ~$ hg clone http://myserver/hg/fooproj foo Which pulls down the directory structure properly and adds the folder ~/foo/src/mylib which is a local Mercurial repository. This is where the problems begin: the mylib folder is empty aside from the items in .hg. With 2 seconds of investigation, one can see the src/mylib/.hg/hgrc is: [paths] default = http://myserver/hg/fooproj/src/mylib which is completely wrong (attempting a pull of that repo will give a 404 because, well, that URL doesn't make any sense). Logically, the default value should be what I specified in .hgsub or it would get the files from the repository in some way. None of the Mercurial commands return error codes (aside from a pull from within src/mylib), so it clearly believes that it is behaving properly (and just might be), although this does not seem logical at all. What am I doing wrong?

    Read the article

  • mouse wheel operates on scrollbar

    - by basicblock
    If a SWF file or even a component within it has scrollbars, wouldn't it make sense that if the user is hovered over that area (it's in focus) and uses the mouse wheel, that this movement would automatically translate to the scrollbar moving. Any ideas how this is done, the events or classes used for this? I'm open to outside components or classes too. I haven't started yet, but I'll do an item renderer because it's easy to give it scrollbar.

    Read the article

  • ASP.NET MVC Controller parameter processing

    - by Leonardo
    In my application I have a string parameter called "shop" that is required in all controllers, but it needs to be transformed using code like this: shop = shop.Replace("-", " ").ToLower(); How can I do this globally for all controllers without repeating this line in over and over? Thanks, Leo

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >