Search Results

Search found 54623 results on 2185 pages for 'net 4 0 beta 2'.

Page 96/2185 | < Previous Page | 92 93 94 95 96 97 98 99 100 101 102 103  | Next Page >

  • Making A ScrollBar Go To Selected Record In TreeView ASP.Net

    - by Nick
    I have a treeview control that gets populated at runtime with a pyramid of employee names. I put the css scrollbar on the view by putting overflow:auto" in the tag where the treeview is located. The users are now asking me to to have the scrollbar go down in the treeview where a treeview item is selected. How do I make a scroll bar to go to a place where the treeview has been selected? Note: treeView1.SelectedNode.EnsureVisible(); is not available in asp.net need another way.

    Read the article

  • Access ASP.NET control using javascript

    - by user3036965
    I have a basic javascript function like this which works as I am able to dynamically change the textbox in a javascript method at runtime. function MyTst(pVal2) { var x = document.getElementById('<%=myImage.ClientID%>'); x.src = "/images/write.gif"; } In the above code I need to be generic. So replace '<%=myImage.ClientID%' with the input param to my method which in this instance is called pVal2 and contains the asp.net server control image id. Can anyone advise on an approach to do this. I've tried lots of things and just cant seem to get it working. Thanks for any advice.

    Read the article

  • How to restructure ASP.NET application

    - by Ram
    Hi, I have a sample ASP.NET application. The appliaction was developed as POC and not following any design and architectural standards. Now I want to restructure the application. I can see some of the business logic and controls can be reused in future, such as login control. I have two options for restructuring I create a Utility DLL that will contain all such resusable code and another DLL that will contain all controls that can be reused. I will create a separeate DLL for each type which can be reused e.g. Login control. Which option is more better. Although I feel option 1 is good, but I need suggestion from experts.

    Read the article

  • Can I use .NET 4 Code Contracts and remain compatible with .NET 3.5?

    - by mafutrct
    .NET 4 introduced Code Contracts as a new feature. I'd like to use CC, but provide files that can still run in 3.5 SP1. Is that possible? Can I only use parts of the new functionality? Apparently it is possible to have CC only do static checks without being included in the binary files, is that correct? I'm aware CC was available for 3.5 as separate module, is this a feasible workaround in case I can't use the 4 version of CC? Is there a difference in the feature set?

    Read the article

  • DropDownList and SelectListItem Array Item Updates in MVC

    - by Rick Strahl
    So I ran into an interesting behavior today as I deployed my first MVC 4 app tonight. I have a list form that has a filter drop down that allows selection of categories. This list is static and rarely changes so rather than loading these items from the database each time I load the items once and then cache the actual SelectListItem[] array in a static property. However, when we put the site online tonight we immediately noticed that the drop down list was coming up with pre-set values that randomly changed. Didn't take me long to trace this back to the cached list of SelectListItem[]. Clearly the list was getting updated - apparently through the model binding process in the selection postback. To clarify the scenario here's the drop down list definition in the Razor View:@Html.DropDownListFor(mod => mod.QueryParameters.Category, Model.CategoryList, "All Categories") where Model.CategoryList gets set with:[HttpPost] [CompressContent] public ActionResult List(MessageListViewModel model) { InitializeViewModel(model); busEntry entryBus = new busEntry(); var entries = entryBus.GetEntryList(model.QueryParameters); model.Entries = entries; model.DisplayMode = ApplicationDisplayModes.Standard; model.CategoryList = AppUtils.GetCachedCategoryList(); return View(model); } The AppUtils.GetCachedCategoryList() method gets the cached list or loads the list on the first access. The code to load up the list is housed in a Web utility class. The method looks like this:/// <summary> /// Returns a static category list that is cached /// </summary> /// <returns></returns> public static SelectListItem[] GetCachedCategoryList() { if (_CategoryList != null) return _CategoryList; lock (_SyncLock) { if (_CategoryList != null) return _CategoryList; var catBus = new busCategory(); var categories = catBus.GetCategories().ToList(); // Turn list into a SelectItem list var catList= categories .Select(cat => new SelectListItem() { Text = cat.Name, Value = cat.Id.ToString() }) .ToList(); catList.Insert(0, new SelectListItem() { Value = ((int)SpecialCategories.AllCategoriesButRealEstate).ToString(), Text = "All Categories except Real Estate" }); catList.Insert(1, new SelectListItem() { Value = "-1", Text = "--------------------------------" }); _CategoryList = catList.ToArray(); } return _CategoryList; } private static SelectListItem[] _CategoryList ; This seemed normal enough to me - I've been doing stuff like this forever caching smallish lists in memory to avoid an extra trip to the database. This list is used in various places throughout the application - for the list display and also when adding new items and setting up for notifications etc.. Watch that ModelBinder! However, it turns out that this code is clearly causing a problem. It appears that the model binder on the [HttpPost] method is actually updating the list that's bound to and changing the actual entry item in the list and setting its selected value. If you look at the code above I'm not setting the SelectListItem.Selected value anywhere - the only place this value can get set is through ModelBinding. Sure enough when stepping through the code I see that when an item is selected the actual model - model.CategoryList[x].Selected - reflects that. This is bad on several levels: First it's obviously affecting the application behavior - nobody wants to see their drop down list values jump all over the place randomly. But it's also a problem because the array is getting updated by multiple ASP.NET threads which likely would lead to odd crashes from time to time. Not good! In retrospect the modelbinding behavior makes perfect sense. The actual items and the Selected property is the ModelBinder's way of keeping track of one or more selected values. So while I assumed the list to be read-only, the ModelBinder is actually updating it on a post back producing the rather surprising results. Totally missed this during testing and is another one of those little - "Did you know?" moments. So, is there a way around this? Yes but it's maybe not quite obvious. I can't change the behavior of the ModelBinder, but I can certainly change the way that the list is generated. Rather than returning the cached list, I can return a brand new cloned list from the cached items like this:/// <summary> /// Returns a static category list that is cached /// </summary> /// <returns></returns> public static SelectListItem[] GetCachedCategoryList() { if (_CategoryList != null) { // Have to create new instances via projection // to avoid ModelBinding updates to affect this // globally return _CategoryList .Select(cat => new SelectListItem() { Value = cat.Value, Text = cat.Text }) .ToArray(); } …}  The key is that newly created instances of SelectListItems are returned not just filtered instances of the original list. The key here is 'new instances' so that the ModelBinding updates do not update the actual static instance. The code above uses LINQ and a projection into new SelectListItem instances to create this array of fresh instances. And this code works correctly - no more cross-talk between users. Unfortunately this code is also less efficient - it has to reselect the items and uses extra memory for the new array. Knowing what I know now I probably would have not cached the list and just take the hit to read from the database. If there is even a possibility of thread clashes I'm very wary of creating code like this. But since the method already exists and handles this load in one place this fix was easy enough to put in. Live and learn. It's little things like this that can cause some interesting head scratchers sometimes…© Rick Strahl, West Wind Technologies, 2005-2012Posted in MVC  ASP.NET  .NET   Tweet !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs"); (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })();

    Read the article

  • HTTP Push from SQL Server — Comet SQL

    Article provides example solution for presenting data in "real-time" from Microsoft SQL Server in HTML browser. Article presents how to implement Comet functionality in ASP.NET and how to connect Comet with Query Notification from SQL Server.

    Read the article

  • Demo of an Early Beta of Firefox OS Running on a ZTE Developer Phone [Video]

    - by Asian Angel
    Are you curious about Mozilla’s new mobile OS platform? Then here is your chance to see an early beta of Firefox OS in action. This video shows the OS’s built-in web browser, phone dialer, camera, and gallery image viewer running on a developer phone from ZTE. Firefox OS Demo (09-06-12) [via The H Open] How To Create a Customized Windows 7 Installation Disc With Integrated Updates How to Get Pro Features in Windows Home Versions with Third Party Tools HTG Explains: Is ReadyBoost Worth Using?

    Read the article

  • A small, intra-app Object to String Serializer

    - by Rick Strahl
    On a few occasions I've needed a very compact serializer for small and simple, flat object serialization, typically for storage in Cookies or a FormsAuthentication ticket in ASP.NET. XML and JSON serialization are too verbose for those scenarios so a simple property serializer that strings together the values was needed. Originally I did this by hand, but here is a class that automates the process.

    Read the article

  • What do you do when a client requires Rich Text Editing on their website?

    - by George Stocker
    As we all know by now, XSS attacks are dangerous and really easy to pull off. Various frameworks make it easy to encode HTML, like ASP.NET MVC does: <%= Html.Encode("string"); %> But what happens when your client requires that they be able to upload their content directly from a Microsoft Word document? Here's the scenario: People can copy and paste content from Microsoft word into a WYSIWYG editor (in this case tinyMCE), and then that information is posted to a web page. The website is public, but only members of that organization will have access to post information to a webpage. What is the best way to handle this requirement? Currently there is no checking done on what the client posts (since only 'trusted' users can post), but I'm not particularly happy with that and would like to lock it down further in case an account is hacked. The platform in question is ASP.NET MVC. The only conceptual method that I'm aware of that meets these requirements is to whitelist HTML tags and let those pass through. Is there another way? If not, is the best way to let them store it in the Database in any form, but only display it properly encoded and stripped of bad tags? NB: The questions differ in that he only assumes there's one way. I'm also asking the following questions: 1. Is there a better way that doesn't rely on HTML Whitelists? 2. Is there a better way that relies on a different view engine? 3. Is there a WYSIWYG editor that includes the ability to whitelist on the fly? 4. Should I even worry about this since it will only be for 'private posting' (Much in the same way that a private blog allows HTML From the author, but since only he can post, it's not an issue)? Edit #2: If suggesting a WYSIWYG editor, it must be free (as in speech, or as in beer). Update: All of the suggestions thus far revolve around a specific Rich Text Editor to use: Only provide an editor as a suggestion if it allows for sanitization of HTML tags; and it fulfills the requirement of accepting pasted documents from a WYSIWYG Editor like Microsoft Word. There are three methods that I know of: 1. Not allow HTML. 2. Allow HTML, but sanitize it 3. Find a Rich Text Editor that sanitizes and allows HTML. The previous questions remain (1-4 above). Related Question Preventing Cross Site Scripting (XSS)

    Read the article

  • ASP.NET MVC 3 Hosting :: How to Upgrade ASP.NET MVC 2 Project to ASP.NET MVC 3

    - by mbridge
    ASP.NET MVC 3 can be installed side by side with ASP.NET MVC 2 on the same computer, which gives you flexibility in choosing when to upgrade an ASP.NET MVC 2 application to ASP.NET MVC 3. The simplest way to upgrade is to create a new ASP.NET MVC 3 project and copy all the views, controllers, code, and content files from the existing MVC 2 project to the new project and then to update the assembly references in the new project to match the old project. If you have made changes to the Web.config file in the MVC 2 project, you must also merge those changes with the Web.config file in the MVC 3 project. To manually upgrade an existing ASP.NET MVC 2 application to version 3, do the following: 1. In both Web.config files in the MVC 3 project, globally search and replace the MVC version. Find the following: System.Web.Mvc, Version=2.0.0.0 Replace it with the following System.Web.Mvc, Version=3.0.0.0 There are three changes in the root Web.config and four in the Views\Web.config file. 2. In Solution Explorer, delete the reference to System.Web.Mvc (which points to the version 2 DLL). Then add a reference to System.Web.Mvc (v3.0.0.0). 3. In Solution Explorer, right-click the project name and then select Unload Project. Then right-click again and select Edit ProjectName.csproj. 4. Locate the ProjectTypeGuids element and replace {F85E285D-A4E0-4152-9332-AB1D724D3325} with {E53F8FEA-EAE0-44A6-8774-FFD645390401}. 5. Save the changes and then right-click the project and select Reload Project. 6. If the project references any third-party libraries that are compiled using ASP.NET MVC 2, add the following highlighted bindingRedirect element to the Web.config file in the application root under the configuration section: <runtime>   <assemblyBinding >     <dependentAssembly>       <assemblyIdentity name="System.Web.Mvc"           publicKeyToken="31bf3856ad364e35"/>       <bindingRedirect oldVersion="2.0.0.0" newVersion="3.0.0.0"/>     </dependentAssembly>   </assemblyBinding> </runtime> Another ASP.NET MVC 3 article: - Rolling with Razor in MVC v3 Preview - Deploying ASP.NET MVC 3 web application to server where ASP.NET MVC 3 is not installed - RenderAction with ASP.NET MVC 3 Sessionless Controllers

    Read the article

  • Un Service Pack annoncé pour Microsoft Exchange 2010, une beta du SP prévue pour juin

    Mise à jour du 08/04/10 Un Service Pack prévu pour Microsoft Exchange 2010 Améliorera les performances du serveur de messagerie, une beta du SP arrivera en juin Microsoft vient de dévoiler le contenu du prochain Service Pack à venir pour Exchange 2010, le "serveur de communication et de collaboration pour les entreprises, basé sur la messagerie électronique", pour reprendre les propres termes de Redmond. Ce SP1 devrait permettre un meilleur archivage (création de filtres pour mieux automatiser l'archivage ou la suppression des messages), une recherche plus efficace dans les mails (avec l'introduction de la recherche "mu...

    Read the article

  • MVC 4 Beta with Mobile Project FIle Upload does not work

    - by Jim Shaffer
    I am playing around with the new MVC 4 beta release. I created a new web project using the Mobile Application template. I simply added a controller and a view to upload a file, but the file is always null in the action result. Is this a bug, or am I doing something wrong? Controller Code: using System.IO; using System.Web; using System.Web.Mvc; namespace MobileWebExample.Controllers { public class FileUploadController : Controller { public ActionResult Index() { return View(); } [AllowAnonymous] [HttpPost] [AcceptVerbs(HttpVerbs.Post)] public ActionResult Upload(HttpPostedFileBase file) { int i = Request.Files.Count; if (file != null) { if (file.ContentLength > 0) { var fileName = Path.GetFileName(file.FileName); var path = Path.Combine(Server.MapPath("~/App_Data/uploads"), fileName); file.SaveAs(path); } } return RedirectToAction("Index"); } } } And the view looks like this: @{ ViewBag.Title = "Index"; } <h2>Index</h2> <form action="@Url.Action("Upload")" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="file" id="file" /> <input type="submit" value="Submit" /> </form>

    Read the article

  • How do I tell the cases when it's worth to use LINQ?

    - by Lijo
    Many things in LINQ can be accomplished without the library. But for some scenarios, LINQ is most appropriate. Examples are: SELECT - http://stackoverflow.com/questions/11883262/wrapping-list-items-inside-div-in-a-repeater SelectMany, Contains - http://stackoverflow.com/questions/11778979/better-code-pattern-for-checking-existence-of-value Enumerable.Range - http://stackoverflow.com/questions/11780128/scalable-c-sharp-code-for-creating-array-from-config-file WHERE http://stackoverflow.com/questions/13171850/trim-string-if-a-string-ends-with-a-specific-word What factors to take into account when deciding between LINQ and regular .Net language elements?

    Read the article

  • Fedora 13 "Goddard" beta emphasizes automation

    <b>Desktop Linux.com:</b> "The Fedora project released a beta version of Fedora 13 (codenamed "Goddard"). The updated community Linux distribution is touted for features including automatic print-driver installation, the Btrfs filesystem, enhanced 3D driver support, revamped Python bindings, and the Zarafa groupware package, says the project."

    Read the article

  • Unable to install ubuntu 12.04 beta 2 inside windows 7

    - by chetan
    When I install ubuntu 12.04 beta 2 using wubi , first it extracts the files and then asks to reboot to complete the installation. But when I reboot the machine the installation hangs and there is a message "panic occurred, switching to text console " Machine Specification Studio XPS 13 (1340) Laptop: Intel Core 2 Duo P8600 (3MB cache/2.4GHz/1066Mhz FSB) Chipset : NVIDIA® MCP79MX Please contact at [email protected] if any more information needed .

    Read the article

  • Windows Server 2012 sera disponible en septembre, la bêta téléchargée plus de 500 000 fois

    Windows Server 2012 sera disponible en septembre la bêta téléchargée plus de 500 000 fois Mise à jour du 11/07/2012 Après l'annonce de la date de sortie de la version finale de Windows 8 prévue pour fin octobre, Microsoft a également dévoilé la période pendant laquelle sera disponible la version serveur du système d'exploitation. Pendant sa Keynote lors de l'événement WPC de Toronto, Steve Ballmer, PDG de Microsoft, a déclaré que Windows Server 2012 serait disponible sur le marché dès septembre. La version RTM (Release To Manufacturing) sera mise à la disposition des constructeurs la première semaine d'août.

    Read the article

  • Qt Creator 2.5 est sorti en beta, l'EDI supporte plus de fonctionnalités de C++11

    Suite à la sortie de Qt Creator 2.5 en beta, il est grand temps de faire le tour de quelques nouveautés, sans toutes les passer en revue. C++11 Publié en septembre dernier, le standard ISO C++11 se doit d'avoir un meilleur support dans l'EDI ; notamment, on trouvera les mots-clés nullptr, constexpr, static_assert, noexcept et auto, ainsi que les espaces de noms en ligne et les lambdas (partiellement). De même, quelques nouvelles actions de refactorisation sont disponibles : insertion d'un #include pour les identifiants indéfinis, extraction de fonction, réarrangement de liste de paramètres, synchronisa...

    Read the article

  • Upgrades from Beta or CTP SQL Server Software is NOT Supported

    - by BuckWoody
    As of this writing, SQL Server 2008 R2 has released, and just like every release, I get e-mails and calls from folks with this question: “Can I upgrade from Customer Technical Preview (CTP) x or Beta #x or Release Candidate (RC) to the “Released to Manufacturing” (RTM) version?” No. Right up until the last minute, things are changing in the code – and you want that to happen. Our internal testing runs right up until the second we lock down for release, and we watch the CTP/RC/Beta reports to make sure there are no show-stoppers, and fix what we find. And it’s not just “big” changes you need to worry about – a simple change in one line of code can have a massive effect. I know, I know – you’ve possibly upgraded an RC or CTP to the RTM version and it worked “just fine”. But hear this tale: I’ve dealt with someone who faced this exact situation in SQL Server 2008. They upgraded (which is clearly prohibited in the documentation) from a CTP to the RTM version over a year ago. Everything was working fine. But then…one day they had an issue. Couldn’t fix it themselves, we took a look, days went by, and we finally had to call in the big guns for support. Turns out, the upgrade was the problem. So we had to come up with some elaborate schemes to get the system migrated over while they were in production. This was painful for everyone involved. So the answer is still no. Just don’t do it. There is one caveat to this story – if you are a “TAP” customer (you’ll know if you are), we help you move from the CTP products to RTM, but that’s a special case that we track carefully and send along special instructions and tools to help you along. That level of effort isn’t possible on a large scale, so it’s not just a magic tool that we run to upgrade from CTP to RTM. So again, unless you’re a TAP customer, it’s a no-no. Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!

    Read the article

< Previous Page | 92 93 94 95 96 97 98 99 100 101 102 103  | Next Page >