asp.net

Inheriting from Control vs. Web Control

I have read over this which sort of gives an explanation of when you'd choose Web Control vs. Control when creating custom controls but it's not quite enough. I've seen custom controls inherit from either when they're both rending out stuff to the UI. http://msdn.microsoft.com/en-us/library/yhzc935f.aspx "If your control renders a use...

UpdatePanel where Button Event does not fire.

I have a UpdatePanel with a PlaceHold contained in it. I create some controls with Labels and Buttons, when Button is clicked it fires an Event that clears PlaceHolder and adds some Textboxes and a Button with an Event. Problem is when this Button is click it appears to do a PostBack and does not fire Event associated with Button. I th...

Parsing HTML and pulling down a drop down.

I am writing some code that connects to a website, and using C#, and System.IO, reads the html file into my application, and then I continue to parse it. What I am wanting to do now is, there is a drop down (combobox) on this site, that has 2 static values. I am wanting to have my code pick the 2nd option in the combo box and then pars...

Anyone know of an Asp.Net C# CMS type system with a Forms Module

We have a large internal data collection website. I don't have time to create form based data collection pages for every department. I was thinking that there might be some kind of WYSIWYG forms creation module that could be run on top of our website. System would be like a cms, but one that allows custom pages to be created. All the for...

Matching ASP.NET source code to a compiled web application

My client has a compiled ASP.NET 2.0 application that was compiled & deployed a year ago. They also have 4 versions of source code projects/solutions not under source control (stored on previous developer's workstation file system). None of the file dates appear to match one another. Is there any way to determine which (if any) of thos...

Cookies. Case Sensitive Paths. How to rewrite URLs.

We have a sizable collection of applications (>50) all running under a single domain but with different virtual directories. Pretty standard stuff. We store cookies using paths to segregate cookies by application. Paths are set the the Application Path. This seems to work fine as long as the casing of the URL is the same as the applicat...

Bypassing Aggregate Root

Is it okay to get a read-only collection from an aggregate without going through the root to get it? My model does some of this right now and I was wondering if that's an acceptable design. Thanks Edit: Here's an example I have an aggregate root entity called UserAccount and another aggregate root called VideoStore. Users can have mu...

How can I use the dropdownlist to populate/enter data?

Here's my existing code: <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" DataSourceID="dsEmployees" DataTextField="Last_First" DataValueField="EmpNum" onselectedindexchanged="DropDownList1_SelectedIndexChanged"> </asp:DropDownList> ...

how to render a user the local-time using a UTC Time (asp.net & ajax)

Hi, I've an issue while my data persisted as utc date-time and I want my users see the right time (thier) local time. I can do this using javascript that sends the local time from the client machine to server, but this will cause me the first time the page will be seen it will be written using the UTC-Time. do you have more ways? than...

How do I serialize a mail message?

I get the following when tying to serialize a mial message using the los foratter. Error: Sys.WebForms.PageRequestManagerServerErrorException: Error serializing value 'System.Net.Mail.MailMessage' of type 'System.Net.Mail.MailMessage.' Is there an EASY way to serialize this object or am I going have to searialize each o fhte propertie...

ASP.NET > SqlServer; trust and delegation

Hello all, we have a system where they client wants integrated Windows authentication. This is an ASP.NET 3.5 application, connecting to Sql Server 2005. The web server is Server 2003 R2 SP2. The db server is Server 2003 SP2 (not R2). In the db server, I ran the following script exec sp_grantlogin 'myDomain\myUserGroup' USE myDbNam...

How to store value of data binding expression into variable.

Hi, I need to access the value of a bound item several times in a template. Right now my ListView template looks like this: <asp:ListView ID="ListView1" runat="server" ItemPlaceholderID="plc"><br/> <ItemTemplate><br/> <input type="radio" class="myrating<%# DataBinder.Eval(Container.DataItem, "Day")%>" value="3" /><br/> <input type...

How do I return a reference to an interface from a WCF contract?

I have a WCF service. I can return a concrete class without a problem, but returning a reference to an interface causes the following issue. CommunicationException occurred "The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlyin...

TinyMCE Spellchecker in ASP .NET MVC

I followed the tutorial described here, in order to make the TinyMCE Spellchecker work on a Webforms application. But I tried to do the very same thing on a MVC project and keep getting errors every time I try to use the spellchecker. I'd like to know what changes or adjustments I need to make in order to make this word on an ASP .NET M...

How do I configure ASP.Net OutputCache to vary by http vs https?

Here is the scenario, a user opens up non-secure page from our WebApp, let's call it PageA, in their browser and then clicks a link in there that takes them to a secure instance of PageB. Once in PageB the user can subsequently click a link that takes them back to a secure instance of PageA (which they already viewed and is in OutputCach...

How to expand the treeview by a fullpath?

I think this is common usage in treeview, the treeview has a number of level, and I have a path say Level1 > Level2> Level3> Level4 How can I expand the treeview to Level 4 by using the path? any build in function? Thanks. ...

IIS7 hangs on AuthenticateRequest state in the module WindowsAuthentication

Hello All, I am running an ASP.NET application with a custom module registered under IIS7. Until two days back, everything was running fine. Now I notice that the requests started to hang at the AuthenticateRequest state and in the WindowsAuthentication module. My custom module intercepts at the BeginRequest state and processes the req...

Retrieve lost data from log file?

I have an asp.net/vb file that receives data and processes it via a stored procedure. The code had the width set to 2 for the year's varchar, so it was chopped, leaving only the first two digits to get inserted into the db. Is this info possibly retrievable from a system/IIS log file or is it lost forever? thanks! ...

Asp.Net and gridview, the most important control and also the most difficult one. Any TIPS and TRICKS?

hi all I am new to asp.net. So need some practical tips and tricks for using GridView. ...

Problems consuming webservice on ASP.NET on production(IIS) server

We've implemented some SOAP client code on our ASP.NET site that calls up a remote service. Implementation was basically done by using Visual Studio "Add Web Reference" wizard, adding proper 'using remote.service.namespace' to the code and calling the service. Code works perfect locally(from Visual Studio), but fails on production web s...