asp.net

how can I reorder the columns in GridView and Rename the column?

when I dispaly the rows from DB using GridView, the columns appear without order. like: Class Course Name ID and I want to display them by order. like: ID Name Class Course how can I do that ? this is thr first piont the second point is how can I RENAME the column ? thanks, ...

Master Page containing silverlight control

I’ve created a Web Site with Visual Studio 2008 3.0 framework containing a Master Page. Is it possible to use Silverlight in a content area? ...

Getting subsets from Subsonic Collections

Hey, I'm using Subsonic Collections to pull a list of timesheet entries from our database and then databinding them to ASP.net user controls I've created on a page. Is it possible to break one large collection into multiple subsets based on a certain parameter? For example, each of our timesheet entries contain a job code for the part...

Order of events firing off in asp.net

I use gridviews pretty often and sometimes I get confused to where to put certain code. What is the order that events are fired off including all page events? Edited I really am also trying to understand what happens between the page and the Gridview. Do the events ever cross? Or do all page events occur at once then all Gridview even...

ELMAH causing trouble to other ASP.NET application

Hi, I have configured ELMAH for one of my ASP.NET 1.1 application and this works fine. But, when I was trying to run another application in ASP.NET 2.0, it was causing trouble due to HttpModule of ELMAH. Is there any way, I can have a liberty to use it for one application and not for other? -Vipin ...

Inconsistencies When Accessing DataBound Item Controls

Essentially, my question is this: There are two ways that I have experienced setting values to databound controls. Either this way: <asp:Label runat="server" id="MyLabel"><%#DataBinder.Eval(Container.DataItem, "MyValue")%></asp:Label> Or this way: <asp:Label runat="server" id="MyLabel" text=<%#DataBinder.Eval(Container.DataItem, "MyV...

403 Forbidden with Built-In VS 2008 Web Server

I have an ASP.Net webapp where I wanted to test using a different local account. So I created the account, but then started getting 403 Forbidden when logging in with that account. This is using the VS 2008 built-in web server (Cassini). A coworker suggested giving that user account permissions on the project files which I did. I als...

repeater .net properties and methods

With a .NET repeater is there anyway to call methods in the #Eval('') directive? For example, if I am binding to an object with a DateTime property, it would be really convenient to set #Eval("ADateTimeProperty.ToString('hh:mm')") or something along those lines. Is the only option to create another property with that returns a formatte...

Need Help Understand Flow of Control with Event Handlers

Currently, I have some code as follows: protected override void OnLoad(EventArgs e) { if(IsAuthorized(param1, param2, ...)) { //snip } else { Response.Write("Not authorized"); } } protected void MyButton1_Click(object sender, EventArgs e) { //snip } protected void MyButton2_Click(object send...

Save pdf template file to new pdf file after edit text in asp.net

I have pdf file contains some text to replace with another text and save the file with new name. Can I do that with iTextSharp? and how? Can you give me guid for it? ...

Displaying a custom hierarchy.

I have a simple hirachey of Tasks similar to the snipet below: public class Task { public Guid TaskId { get; set; } public Guid ParentId { get; set; } public string Name { get; set; } public List<Task> Subtasks = new List<Task>(); } What would be be the best way to display this data? A TreeView would be look ideal but ...

CalendarExtender Positioning Problem

I am adding a CalendarExtender to a page, using the default styles. When I click the calendar button to trigger the calendar popup, the calendar displays normally. However, when I scroll down and click the button again, the calendar's position is not where it should be, as seen below. Why is this occuring and how do I fix it? EDIT:...

lenth of a video file flv -mpg -avi

I am trying to add video files to a sql server database table and one of my field is supposed to be the length of the video file. Is there an easy way to get that information in asp.net for files of type .flv - avi - mpg ...? update: i should have precised it .. i meant length in terms of minutes and seconds. ...

Disable Session from Master Page

In ASP.NET, I would like to disable session state from master page, however @Master directive doesn't have EnableSessionState attribute as @Page does. Is there any workaround? ...

How do I remove the header info using an HttpModule to Upload a file?

I've created an HttpModule in ASP.NET to allow users to upload large files. I found some sample code online that I was able to adapt for my needs. I grab the file if it is a multi-part message and then I chunk the bytes and write them to disk. The problem is that the file is always corrupt. After doing some research, it turns out t...

How to set the screen resolution dynamically in Asp.Net application with C# as language

How to set the screen resolution dynamically in Asp.Net application with C# as language I have created an asp.net app on my machine where the resolution is set to 1280 x 1024. When my users view the form on their screen, some of the controls display differently than on my screen. One solution I have is to use some javascript to ...

Dynamically setting screen resolution in Asp.Net(C#) .net framework 1.0

Hi I have designed a page with all asp.net controls which is well alligned in 1024*1024 resolution but in other resolution it gets misalligned..please help if we cant change the resolution then please tell me what i have to do.. ...

Why is HttpApplication constructor called several times

Hi, Can somebody explain why the constructor of a custom class derived from HttpApplication is called several times upon application startup? My code structure is the following: - My Global class in global.asax derives from CustomApp class. - The CustomApp class derives from HttpApplication class The Global class is created at start...

Is submitting a form in javascript significantly faster than server-side submitting?

I was told that using javascript to submit in either asp or asp.net causes a faster submit. Is this true or is there no significant difference? ...

HScrollBar Control in ASP.Net?

Hello, I was wondering, do you guys know about some replication of the HScrollBar from WinForms to ASP.Net? ...