asp.net

Is .Net reading web.config from top to bottom?

1) If ( inside web.config file ) I declare custom section named songPoem before <configSection> , an error is reported saying songPoem element is not recognized. Thus, the following gives me an error: <songPoem song=”lalala” /> <configSection> <section name=”songPoem” type=”A” /> </configSection> while the following works just fin...

Random minutes in C# 2.0

Ho do I go about adding random minutes to column in dataset, here is my code: protected void btnUpdateTable_Click(object sender, EventArgs e) { foreach (DataRow dr in ds.Tables[0].Rows) { ///check if column[logout] is null or empty, fill it if(dr.IsNull("logout_time")) { ///get the login colum ...

Validating dropdownlist OR textbox

I have a page where a user can either select a vendor via dropdown or enter a vendor number via textbox. One or the other must have a value. I can do this in javascript easily but how can I do this using a custom validator provided by ajax all on the client side? Edited Protected Sub ImageButton1_Click(ByVal sender As Object, ByVal e ...

Asp.net membership

If I want to do an admin function like delete a user on the asp.net membership stuff that ships with the asp.net mvc sample. I tried looking through the tables and realized that there was multiple tables that had rows added. I assume there must be a simpler way. ...

How do I show a modal dialog while the databind occurs?

I have a form with gridview that is bound to a complex stored procedure (financial data). This query takes about 3 minutes to run and load the gridview. The users get impatient and click "Search" repeatedly, which just makes things worse. As an interim solution, I'd like to show a progress bar, and I found a solution using the ASP.NET A...

programatically remove all html and inline formatting

i have taken over a code base and i have to read in these html files that were genreated by microsoft word, i think so it has all kinds of whacky inline formatting. is there anyway to parse out all of the bad inline formatting and just get the text from this stream. i basically want a purifier programatically so i can then apply some se...

ASP.NET BasePage Class Page_Load not Fired on Postback

I have the following BasePage class... Public Class BasePage Inherits System.Web.UI.Page Private litError As Literal Protected SO As Session Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load SO = Session.Item("SO") If SO Is Nothing Then Session.Aba...

How to programmatically clear outputcache for controller action method

If the controller action has the OutputCache attribute specified on an action, is there anyway to clear the outputcache without having to restart IIS? [OutputCache (Duration=3600,VaryByParam="param1;param2")] public string AjaxHtmlOutputMethod(string param1, string param2) { var someModel = SomeModel.Find( param1, param2 ); //set u...

How to force ASMX web service to send JSON data to client on HTTP GET request?

I'm trying to use the official jQuery autocomplete plugin with an ASMX web service in an ASP.NET 3.5 Web Forms application. If I understand it correctly, the autocomplete plugin can only use HTTP GET to call a service (with two query string parameters: q and limit). I figured out how to make the web service respond to the HTTP GET calls,...

PreRender event is not fired

Recently i've noticed, that the Page_PreRender event is not being fired. If protected override void OnPreRender is used - everything is fine. AutoWire is enabled and the same code performs just fine on another machine... Where should i dig? ...

What is the state of the art Web Application framework?

I am wanting to develop a web application, what is the current state of the art to do so? Google Web Toolkit? Favorite languages: C#, Java, Python. If I understand correctly the respective best ways are ASP.NET, Spring, and Django correct? Also Rails is out there too. I'm just saying general purpose? Suppose you had a version of MSP...

Generate CheckBoxList without Bit/Boolean (Oracle)

I have a table for a subscription list in Oracle with several columns where one is a NUMBER (0/1) since Oracle doesn't have a boolean type. It might look something like this | NAME | FLAG | DATESENT | +-------+-------+----------+ | Feed1 | true | 07/22/09 | +-------+-------+----------+ | Feed2 | false | 07/22/09 | +-------+-------+-...

What's the fastest way to load a text or ntext SQL Server column?

I do this as simple as possible, but sometimes the query takes 3+ second. I'm using a basic parameterized query like this: SELECT TextStuff FROM MyInfo WITH (NOLOCK) WHERE MyInfoID=@MyInfoID Is there a faster way to do this? Would performance improve if I converted the ntext column into an nvarchar(MAX) column? ...

ASP.Net Version/Build Number

I have a ASP.Net (.net 3.5/c#) and I want to display a version number / build number and date. What is the best way in controling this and is it possible to auto incriment the numbers on build? What is the standard for version numbers & build number? Im using VS 2008 how would I get the data and assign to a string value so I can show i...

Do we need to create three xml for each encrypted config file

Hi guys, I was wondering whether if I need to create three xml files for 3 config file which im trying to encrypt. Or do i need 1 xml file for 3 config files. In other way Can I use the same xml file to decrypt all the 3 config files. ...

ASP.NET vs Infopath for forms

We use Infopath at work, quite frequently for form design and then we integrate this into MOSS 2007. What I don't yet know is what advantages are there to designing a form in Infopath as opposed to making a webpage (eg ASP.NET/C#) to allow for the same intention? Thanks ...

Web reference behavior in an ASP.NET web site project

On my local workstation, I have a Visual Studio studio that contains a .NET 3.5 C# class library project and an .NET 3.5 ASP.NET web site project. I created a web reference (example http://prod.webservices/myservice/default.asmx) in the C# class library using the "Add Web Reference" module. It created an app.config with the following...

Does anyone kown any open source Stock Control System with ASP.NET or ASP.NET MVC

Does anyone kown any open source Stock Control Systems with ASP.NET or ASP.NET MVC? I'm planning to help my friend to build a website to manage his products after work. The very basic functions should contain "Membership", "Low Stock Notice", "Best Before Notice" and so on. I would love to try ASP.NET MVC with this application? If so...

Oracle: tracing SQL statements

I'm maintaining an home-brew web-based help-desk solution and we are experiencing an erroneous change in a db field under some circumstances. The code involved is quite frankly a mess, mixing different approaches to database access (the worst and most dangerous one being building sql strings through concatenation). A full-text search of ...

How would I uniquely identify an entity in Entity Framework?

I'm using the Entity Framework as my ORM for an ASP.Net (webforms) application. Suppose I had a "list/detail" set of pages in my application, when you click on a row in the list page I would want to pass an ID of some type for that row to a detail page, which I'd then use to load the row from my data layer. In my specific case, the pri...