asp.net

Html.RenderParial, how to pass and use the model?

I am doing this: <% Html.RenderPartial("SomePartial", Model); %> My Model has a property UserID In my partial I try this: <%= Model.UserID %> but I get this error: CS1061: 'object' does not contain a definition for 'UserID' and no extension method 'UserID' accepting a first argument of type 'object' could be found (are you missing...

activate/deactivate javascript on button click

I am using a javascript to zoom an image on my asp.net web page. I want to put 2 buttons on it like "Zoom" "Cancel Zoom" and accordingly activate/deactivate the javascript functionality. Right now I have a css class on which the javascript operated to produces the zoom effect. The image is like: <a id="big" href="source of image" class...

Get Checkboxlist Values using jquery and pass them to a web method

I have been scratching my head all evening with this. Anyone with an idea of how I can go about this? I am using asp.net c# ...

Fundamental .NET - How references are 'stored / resolved'.

Note the following code: Control foo = null; Control bar = null; int i = 0; protected void Page_Load(object sender, EventArgs e) { test(); test(); Page.Controls.Add(foo); } void test() { i++; bar = new Control(); bar.Controls.Add(new LiteralControl(i.ToString())); if (foo == null) { foo = new Co...

Savings Counter Module for DotNetNuke?

I have searched long and hard for module that would show Customer Savings(in $$). There are two ways I wish to possibly implement this. Method One: Customer enters a "base" $$ amount, start date, and an incrementing value per time period Ex: Base=$1,000,000; Start:1/1/2010; Increment=$100; Time Period=Minute This would diplay $1,432,000...

listview item indexing

I am using a listview with 6 items per page. When I choose an item from the 6 items it should take me to a page with 3 items per page BUT the selected item (on previous page) as FIRST item in the list on the new page. Basically how do I set which items shows first in the listview? Is that a property? ...

Options for implementing search in .Net web projects?

I come from a background in Ruby on Rails. Implementing search is relatively trivia using some of the excellent search plugins available to that community (i.e., Sphinx, Solr, etc.). In .Net, what's a similar counter part the above strategies? I discovered DotLucene -- but, that project is now closed. Any others I should consider? T...

unitpngfix javascript:Void(0) error not allowing to show page with https(securely)

Guys, I have a problem with the below one. This Javascript:void(0) is stopping me from showing the page securely with https. What is it actually? I have no idea about javascript. Please help me out! Thanks alot! var clear="js/clear.gif"; //path to clear.gif document.write('<script type="text/javascript" id="ct" defer="defer" src="j...

Web.config ignoring module

I'm trying to use an http module and corresponding configuration section that I downloaded from http://www.codeproject.com/KB/web-security/WebPageSecurity_v2.aspx. However, my application seems to be ignoring these added items. I set up a test application with the specified configuration and it ran fine. When I tried to add the same...

Tabs in aspx page

I need to put two tabs on my aspx page (c#). Is there already done tabs control for aspx ? ...

Calling GetAvailableThreads for different thread pools

I've used the ThreadPool.GetAvailableThreads to monitor the thread usage in a web site, and written the results to a performance counter. To do this, I've had a thread running in the site that does the monitoring. I'd like to be able to monitor this without modifying sites' code. Is there a way I can write a console app that would be abl...

Active scripting is enabled on ie but my javascript is not showing up

I have a site created using .net and the ajaxcontroltoolkit. When some users log on they do not see the controls on the page. I can duplicate this if I disable active scripting in ie. The problem is that the users I have spoken with have active scripting enabled. I have had them navigate to a site that tests javascript and it passes. Has...

Updating ASP.NET server-rendered controls using ajax

This question got me thinking about how one might go about doing the relatively undoable: seamlessly integrate server-generated HTML from ASP.NET with client-side control via javascript. Sure, you can always use javascript/jquery/libraries to create the same display client-side. But much of the time, it's easier to do all the rendering o...

Test driven development : asp.net mvc..

Hi, I am taking baby steps in to strictly following TDD and IOC methodology from my asp.net mvc project. Its very painful and its hard for me to think straight. Its like I am going blind and totally in the dark. Its forcing me to learn new C# features. God.. I miss the good old drag and drop days and just keep coding away the featur...

IIS Redirect From Specific Outdated URL?

Hello all, One of my clients refers people to a certain URL. She prints the URL on physical letters, and the recipients have a few weeks to visit the URL and complete the task. Let's say that the URL she gives is: www.department-a.domain.com/folder/important-page.html The problem is that I am switching Content Management Systems so ...

ObservableCollection for Web froms

I have not worked on WPF.I had that Observable collection works like events to LINQ.I also referred some libraries in codeplex (obtics) and MS Reactive Framework all are specific for WPF (I guess so). My intension is to work on same techniques on Web forms.Say I have declared List<Person> personList= new List<Person>() ...

ASP.NET UnauthorizedAccessException when accessing item from cache

We have some code that occasionally flushed out certain keys in the ASP.NET cache in order to make sure that we are getting up to date data from our Dynamics CRM system. It seems to work fine most of the time, however we are getting intermittent exceptions on page reloads that I suspect is related to this forced cache flushing. Here is ...

Problem creating MembershipUser for custom MembershipProvider

Hello, I created a custom membership provider and am getting the following error trying to create a new "MembershipUser". Could not load type 'MyTestApp.Membership.TestMembershipProvider' from assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. I am running this from a Unit Test project, so I'm no...

Asp.Net App Pool Overlapped Recycling Timing?

As best I can tell when a worker process recycles: a) a new one spins up before the old one shuts down b) the old one shuts down once all the active requests its servicing completes Is the above accurate? If so, I have data that I store in SQL once Application_End() fires from the global.ascx file. I pull this data back in when Applic...

C# and JavaScript results from same regular expression string are very different - how can I make results more consistent?

The reg ex string is as follows: px\">(.+)</SPAN When I use this code with this expression in C#, and compare with the body of an html document, I get back a short string like so: Match match = Regex.Match( fullText, regExString, RegexOptions.IgnoreCase ); .. gets px">Cart is empty </span><a href="http://www.somesite.co.uk/shop/ca...