asp.net

Building a composite control with nested items

My goal is to create a composite control that looks like, acts like and behaves like a RadioButtonList. There is some extra things done behind the scenes which are working no problem. What I am unable to accomplish is the desired markup to use the control. My ideal markup looks like this: <cc1:RadioButtonField ID="rfCardType" runat="...

ASP.Net controls appear on page, but not in a user control on that page

I am using an ASP.Net Web Application project. I have a user control which has an asp.net button in it. When i use that user control on the page, the button does not appear, but if i put the button directly on the page, the buttons shows up. Any idea what the problem is? Also, inside that user control, i can override the render meth...

Dynamically reducing image dimension as well as image size in C#

I have an image gallery that is created using a repeater control. The repeater gets bound inside my code behind file to a table that contains various image paths. The images in my repeater are populated like this <img src='<%# Eval("PicturePath")' %>' height='200px' width='150px'/> (or something along those lines, I don't recall the...

ASP.NET Error Handling

In my asp.net applications, I've typically used the Application_Error global event handler to log the error and redirect the user to a user-friendly error page. However, I have read about ELMAH and while that seems interesting, Application_Error seems like the simpler approach. I've read other questions where people, including myself...

What are the performance implications of wildcard mapping all requests through IIS 6.0?

I am interested in using UrlRewriter.NET and noticed in the config page for IIS 6.0 on Win2k3, that they say to map all requests through the ASP.NET ISAPI. That's fine, but I am wondering if anyone has good or bad things to say about this performance wise? Is my web server going to be dragged down to its knees by doing this or will it ...

Does memcached have a mechanism to redistribute its cache?

Problem: I have a server farm which uses non-sticky IP's and a Session Server to maintain sessions for all the servers. So it doesn't matter which server a client comes back to because the server will always go to the Session Server to get that client's session data. When I take the Session Server down all the servers lose their session ...

How can a custom ASP.NET control cache data without using the ViewState?

I'm not sure if this is possible in ASP.NET, but here is the problem I have: some of the data lists on my web application are displayed using a GridView; however, because some of these lists can contain a lot of data, they sometime push the page weight up into the several megabyte range due to the ViewState. Since we don't want to requer...

How would I search through a DataSet and change data in it before it gets bound?

Try Dim ds As DataSet = SqlHelper.ExecuteDataset(ConfigurationManager.ConnectionStrings("connstr").ConnectionString, CommandType.StoredProcedure, "Get_All", New SqlParameter("@userid", Session("userid"))) rptBundles.DataSource = ds.Tables(0) Catch ex As Exception showerror(ex, Me) End Try That is the code, I want to be a...

ASP.NET Gridview with all records editable.

I thought this would be simple, but I sure am having a lot of trouble doing this: The title of this question may be a bit misleading. I don't have to use a gridview. In fact, I know the GridView is probably not the way to go on this. I just didn't know how else to title it. But, for now just consider: I have a very simple class called ...

Is there a way to add filter transitions to an Image control

I am trying to create a slideshow using Javascript and an asp.net image control. I am unable to add filter property to the image control. Any suggestions ? or is it possible to set the filter in javascript? ex: I want to be able to add style="filter:revealTrans(duration=2,transition=23)" to the image in "" control. Thanks ...

How does Session_Start() work in server farm?

Does the OnSessionStart / Session_Start event still only fire once (total) in a server farm environment, or since requests are handled by multiple servers, could it fire up to once per server? ASP.NET / IIS6 or 7 It should not be assumed that the server is using Sticky Sessions. ...

Is there a good way to create a recurring import for an ASP.NET site?

The site I'm working on is running Windows Server 2003 and SQL Server 8 (2000?), and ASP.NET 3.5. I need to have some sort of script or application run to import data from an FTP'd text file, into the database. There is already a site running on the machine, that uses the current database. Can I use a scheduled task to reliably kick o...

Dictionary<T> of List<T> and ListViews in ASP.NET

Preamble I'm asking this question because even though I've read through a lot of ListView resources, I'm still not 'getting' it. Background I have a bunch of Foo's that have a list of items associated with them (known as Bar), and I'm pulling them from the Data Access/Business Logic layer as Dictionary that holds a Foo and its associ...

UpdatePanel in Repeater

I have a UserControl which contains voting buttons inside an UpdatePanel, and outside a Repeater, it works perfectly. In the repeater, clicking the button fires off the appropriate event. That event is supposed to update the text of a control within the User Control, and that update should be reflected when the UpdatePanel refreshes. If...

ASP.NET - No Datakey on Gridview RowDeleting event!

I have a GridView just like this: <asp:GridView ID="gvwStudents" runat="server" AutoGenerateColumns="False" DataKeyNames="ID" ShowHeader="False" onrowdeleting="gvwStudents_RowDeleting"> <Columns> <asp:BoundField DataField="FirstName" /> <asp:BoundField DataField="LastName" /> <asp:BoundField DataFiel...

WebForm_SaveScrollPositionSubmit is undefined - ASP.NET

I'm upgrading an ASP.NET 1.1 app and have things working but am seeing the Javascript error referenced in the title. From research it appears that ASP.NET is not spitting out the javascript that is used to maintain scroll position between postbacks. I did some googling and have checked the various issues mentioned but can't seem to fin...

Gridview disappears on postback when paging is enabled.

I have a gridview that has its DataSourceID property set to a custom ObjectDataSource object. When AllowPaging is set to True, the GridView disappears after a postback. If I set AllowPaging to False it's fine. Can someone shed some light on this for me? :) Edit: The other thing I'm confused about is I thought that if you set the DataSou...

NotImplementedException thrown when using ASP.net chart control

Has anyone got this exception thrown when using the the controls databinding methods?? I have a data structure like this public class ChartData { public int Year {get;set;} public decimal Stat {get;set;} } Its collection is List<ChartData> cData; So i bind this object as chart1.BindXY(cData,"Year",cData,"Stat"); I get ...

asp.net Authorization: location and IPrincipal.IsInRole

Scenario I'm using a Custom IPrincipal and IIdentity to do asp.net authorization. I set the Principal and Identity during the PostAuthenticateRequest event using an IHttpModule. The web.config looks approximately like the following: <system.web> <authorization> <allow verbs="GET,POST" roles="domain\group"/> <deny verbs="*" ...

Using deployment=true at site level

I am using the <deployment retail="true"/> setting in my machine.config. This is per ScottGu's (and others') advice: However, I am running both dev and production on the same box. For dev, I want to be able to Trace while preventing it on the production site. My initial research indicates that <deployment> can only apply to the whole...