Search Results

Search found 32 results on 2 pages for 'griegs'.

Page 2/2 | < Previous Page | 1 2 

  • Strip text of all formatting on paste

    - by griegs
    I have an application that allows the user to create an article. The problem arises when the user pastes from something like Word which comes loaded with a bunch of markup. I'm using a jQuery editor called tiny_mce which allows the markup. I do a htmlencode and decode obviously but it means that i carry a huge payload of markup. Is there a way to strip (all) markup from pasted text and just keep the text? Or is there a way that tiny_mce can show the markup as text?

    Read the article

  • Where do enumerations belong

    - by griegs
    At my current place of emplyment they were putting enumerations into the class they used them in. Whilst I didn't see any duplication of these enumerations I non the less thought that they didn't belong in the class so I moved them out into their own class. The reason I did that was that I wanted them to be re-usable w/out needing to reference the model class they were originally in. I got asked why I did that by the boss who disagreed with me as to my reasons for moving them and say nothing wrong with putting enumerations in a model class. So where should they be? Is it acceptable to leave enumerations in a class and hope that others in the project know to refactor your code if they want to re-use it elsewhere or should, as I did, you create an enumerations class and have them all in there?

    Read the article

  • How do I get the action name from a base controller?

    - by griegs
    Hi, I'd like to implement a base controller on one of my controllers. Within that base controller, I'd like to be able to get the current executing ActionResult name. How would I go about doing this? public class HomeController : ControllerBase { public ActionResult Index() { And; public class ControllerBase : Controller { public ControllerBase() { //method which will get the executing ActionResult } }

    Read the article

  • Linq to CSV select by column

    - by griegs
    If I have the following (sample) text file; year,2008,2009,2010 income,1000,1500,2000 dividends,100,200,300 net profit,1100,1700,2300 expenses,500,600,500 profit,600,1100,1800 Is there a way in Linq that I can select the expenses for 2010 only? So far I have the following which gets me all the data; var data = File.ReadAllLines(fileName) .Select( l => { var split = l.CsvSplit(); return split; } ); foreach (var item in data) Console.WriteLine("{0}: ${1}", item[0], item[1]);

    Read the article

  • How to Backup Emails that are Archived on Server

    - by griegs
    Our exchange system here has been setup that any emails older and x weeks are automatically archived. Once they are when you click on them they are loaded from the archive and then opened. This makes backing older emails up onto say another drive impossible because when I open them from say home, I'm not connected to the exchange server and thus the email cannot be opened. Is there a way I can back them up and still have them available?

    Read the article

< Previous Page | 1 2