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...
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...
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#
...
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...
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...
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?
...
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...
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...
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...
I need to put two tabs on my aspx page (c#). Is there already done tabs control for aspx ?
...
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...
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...
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...
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...
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 ...
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>()
...
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 ...
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...
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...
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...