asp.net

How do you center a textbox inside an ASP panel?

Let's say my panel is 200px and i want 5px padding on the left and right, the textbox to be the max size it can (I could calculate it but is there a dynamic way to do this with the browser). The trickier part is how do I get an even amount of padding on top and bottom? ...

Determine if page is valid in JavaScript - ASP.NET

What is the best way to determine if a form on an ASPX page is valid in JavaScript? I am trying to check the validation of an user control that was opened using the JavaScript window.showModalDialog() and checking the 'Page.IsValid' property on the server side does not work. I am using ASP.NET validation controls for page validation....

free open online projects?

hi guys, another victim of the recession here. got tired of reading up on c# stuff and i want to work on a project now. looking for projects i can work on where we can keep in touch online. i have a couple of years of c# experience. source forge seemed cool but can't be browsed by programming language :/ so if you are working on someth...

getting the mime of text files

I am using a piece of code someone pasted for C# which uses urlmon.dll. It reads in <= 256bytes and returns the mime based on the data. Problem is it cant distinguishes a css file from a text/plain. I can goto /style.css but when including it in my html the CSS does not show up. I am using urlmon + context.Response.TransmitFile to send ...

Getting the mime w/o using urlmon

I was using urlmon to find the MIME of files however it didnt go well when i couldn't get the correct mime of css files and more SWFs. What can i use to get the file mime? ...

Does anybody write desktop apps using .NET?

I honsetly can't say that I have ever seen a commercial app that uses .NET (other then controls for devs/open source). With it being so easy to 'decompile' a .NET application using RedGates .NET Reflector, I was wondering if .NET was geared toward ASP.NET (since you can't 'decompile' because the code runs on a server and is not stored on...

Cant upload sound files in visualstudios server

Whenever i try to upload a sound file i get the error "The connection to the server was reset while the page was loading.". The sound file is 5.58mb, an .OGG. My server is visual studios 9 (2008). The form uses enctype="multipart/form-data". I have a feeling it may be a filesize limit but i dont know where to change the file length allow...

How to select records from db according to date range?

I have a "LOGTS" columns with datetime data type in a table, i would like to select my records which is within the range of "Last Week", "2 Weeks Ago" and etc! How do i do this? ...

ASP.NET Windows Authentication logout

How do you logout when using Windows authentication in ASP.NET like this web.config? <authentication mode="Windows" /> I've already tried the following unsuccessfully. It redirects, but does not log out the user. void logoutButton_Click(object sender, EventArgs e) { HttpContext.Current.Session.Clear(); HttpContext.Current.Se...

Error running ASP.NET MVC on IIS 7

Hi, I have been trying to deploy my asp.net mvc site to IIS 7 and having a bit of an issue. Whenever I run the site, I get a "Could not load type 'System.Web.Mvc.ViewPage'.". When I try to access a page with a master page, I get a Could not load type 'System.Web.Mvc.MasterViewPage'" error. I tried using tracing rules in IIS 7 to narro...

Regarding cell click in datagrid

hi guys, I have a datagrid.Its 1st column is ClientType.On clicking each cell in the first column i.e ClientType,that value is shown in textbox named txtClientType.For that i used the following code. Private Sub dtGridsearch_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles dt...

What can cause an unexpected reboot during setup?

I have built a web setup project in Visual Studio. When it is installed on one machine it prompted the user to reboot and I don't know why. It is installing over the top of a previous version. It doesn't do it on my machine. What can cause this, and is there any way I can prevent it? I don't see any reason for it to occur, it's just a ...

ASP.net Repeater get current pointer/counter

Hey guys, the question is really simple. Is there a way to access the current pointer/counter for an asp Repeater control. I have a list with items and I would like one of the repeaters columns (it repeats and html table) to be something like ... Item 1 | some info Item 2 | some info ... and so on 1 and 2 being the counter. any he...

grid view event

I have button in footer in grid view (that view binding list of entities that have boolean value) the grid view have 3column of template field (textbox1, textbox1, checkbox1) in row data bound i set each value of these controls from my static list of entities i have add event on each template field textbox1_textChanged(), textbox2_TextC...

how to clear off gridview?

I'm creating a dynamic gridview function which will bind different tables from DB into a datatable and then assign the datatable to the gridview! This is how it works, i have a dropdownlist, gridview and a button, the button will fire specific function based on the dropdownlist selection and then gridview will bind the data, my problem i...

What's your favorite Advanced ASP.NET book?

What would be some highly recommended books to get for a mid-level developer to learn advanced ASP.NET/C#/VB.NET techniques? Including, but not limited to, taking advantage of inheritance, when to use base pages, overriding base class methods, application architecture, interfaces, applying GOF design patterns in Web Applications, DAL, an...

Timer events do not fire in a thread when using Server.MapPath

Hi, I have the following scenario with ASP.NET 2.0. I have declared an atlas:timer as follows in my .aspx page: <atlas:Timer ID="Timer1" OnTick="Timer1_Tick" runat="server" Interval="3000" Enabled="false"> </atlas:Timer> I also have a button on a form which when clicked launches a new System.Threading.Thr...

ASP .Net User Roles - ordering for a drop down.

We are using the standard aspnet security features, we have need to set the order of the roles, purely for display purposes. We could just have a sequence number onto the end of the aspnet_roles table, but that feels kinds of hacky to me. Also if in future versions of asp the security get changed we will be in trouble. Is there a bette...

Concerned with login controls

hi guys, I have a masterpage in which i have Loginname control.I have a link in masterpage which redirects to register.aspx which contains createuserwizard as follows. <%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/MasterPages/AdminMaster.Master" CodeBehind="Register.aspx.vb" Inherits="Architect.Register" %> ...

Mobile frameworks for ASP.NET (better open source)

The question is simple, What mobile frameworks are you using in ASP.NET? We are using Mobile Controls + WURFL. Thx in advance, ...