Archived Months
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008
May 2008
June 2008


all groups > asp.net > march 2004 > threads for monday march 22

Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

suspicious cookie in trace
Posted by A.M at 3/22/2004 11:38:47 PM
Hi, When I enable trace in my asp.net application, I always have a cookie called "reportPreview" with the value "(viewer=0)". My code doesn't add such cookie. How can I know who adds that cookie to cookie list? Thanks, Ali ...more >>

Global Variable value lost
Posted by John Mason at 3/22/2004 11:34:22 PM
Hi, I am new to asp.net (but not asp 3.0), and am trying to figure out why the value of a global string variable is not available in a click event sub-routine. I declare the global variable directly under the script tag (before the page_load sub)... as... Dim globaltext as String In a...more >>

HttpContext.RewritePath -- .asp to .aspx
Posted by umbertoeklat NO[at]SPAM yahoo.com at 3/22/2004 10:53:06 PM
How do I make use of HttpContext.RewritePath so that all ".asp" extension pages will be rewritten to an ".aspx" page I already tried mapping .asp to aspnet_isapi.dll but it doesn't work. it says "This type of page is not served." Thanks in advance....more >>

updating one table with info from another one?
Posted by Rudi Ahlers at 3/22/2004 9:19:39 PM
How is this done? Cause update comments set subscriber='Y' where comments.supplier = company.company_name doesn't work Yet, select comments.subscriber, comments.supplier, company.company_name where comments.supplier = company.company_name does work.... -- Kind Regards Rudi Ahlers +27...more >>

newbie object question
Posted by Chris Kennedy at 3/22/2004 8:59:30 PM
I have created an object which has a method which 'binds' the values from a dataview to some text fields. The row is determined by a property which set before the method. When I set the property via a button click I can see the property value change in the debugger. When I click the button again ...more >>

Posting data to other sites
Posted by Paul Hodgson at 3/22/2004 8:49:03 PM
The web site I'm working on needs to interact with another site, whose services we are using. This means that we need need to post some form data to a secure web page on the remote site, and then get a reply back. This was easy to do in ASP - you just did <form method="post" action="Url_of_the_...more >>

Error Handling and UI Presentation
Posted by Jeff S at 3/22/2004 7:17:00 PM
I'm looking for suggestions on how to handle the situation in which some error occurs and I need to tell the user something about it. I'm currently developing error handling in the DAL and currently handle most of the likely runtime error scenarios there. What I need to ensure is that the user se...more >>

Access denied error.
Posted by AB at 3/22/2004 6:37:33 PM
I am calling an office object in asp.net framework to view an info online in an excel sheet. Is this a component problem?, because on the remote server we have office 2000 installed and on the local server we are using office XP 2002? We have developed locally and upload onto remote server. ...more >>



event log errors
Posted by RP at 3/22/2004 5:21:21 PM
Hi all, my web server's event log gets filled up every day with atleast a dozen entries of the following:- aspnet_wp.exe (PID: 160) was recycled because it was suspected to be in a deadlocked state. It did not send any responses for pending requests in the last 180 seconds. Any ideas? The ...more >>

DataGrid.ItemCommand
Posted by - Steve - at 3/22/2004 4:50:01 PM
I'm really struggling with connecting the code for a PushButton on my datagrid. On the aspx file I have the following code: <asp:ButtonColumn Text="Create User" ButtonType="PushButton" CommandName="createUser"></asp:ButtonColumn> Then on the codebehind file (C# by the way) private void ...more >>

Debug project on remote server
Posted by Marcin Tracz at 3/22/2004 4:30:46 PM
Hi! Is it posibble to debug project which is on other machine that I work now? I've got some problem on server that is away from me and I have to debug not on my machine but those machine. It is posibble to do this using Visual Studio .Net 2003? Thanks for answer! Marcin...more >>

Server Application Unavailable
Posted by Philip Mattson at 3/22/2004 4:07:52 PM
Hi all, I''m running a ASP.Net app and it will run for awhile after a system restart. Eventually all ASP.Net pages on the site will return the "Server Application Unavailable" error. The message says that detailed error information may be found in the application event log, however, there i...more >>

DAL Component
Posted by Thiago Temple at 3/22/2004 4:00:16 PM
I built a Data Access Layer Component, as Microsoft documentation recomends. I have a Class Library (Application Layer) that uses this DAL component, the point is, to make this component usefull, the com expects a connection string to connect to the database. The string is stored in .resx file (...more >>

Application.Lock()
Posted by A.M at 3/22/2004 3:58:38 PM
Hi, I have following code inside Global.asax.cs. It decrypts the connection string and assigns it to m_strConnectionString. subsequent instances of application use the same value. I am wondering that can this property cause concurrency problems? Should I Lock and Unlock application object w...more >>

How do i specify that i want to use TCP/IP to connect to SQL server
Posted by George Ter-Saakov at 3/22/2004 3:47:39 PM
Hi. After upgrading to Windows 2003 NetPipes not working anymore when trying to connect to SQL. I guess some security tweaking needed but our admins do not know how to enable it. How can i specify that i want to connect using TCP/IP using System.Data.SqlClient.SqlConnection Right now i ...more >>

Help with Creating a Class
Posted by Paul Say at 3/22/2004 3:17:05 PM
At Present I have several properties of a page that are use to store variables between page calls in the pages view state eg. Property View() as String Get Dim o As Object = ViewState("View") If o Is Nothing Then Return String.Empty End If Re...more >>

Starting places ASP vs ASP .Net ?
Posted by Jay at 3/22/2004 2:51:32 PM
Can any one list a few starting places for differences between ASP and ASP ..Net. I know there was a MS article 2 years ago but I can't find it. Thanks, -J ...more >>

Creating Repeater control dynamically
Posted by Randall at 3/22/2004 2:41:07 PM
Hi all Is it possible to create the repeater control dynamically I need to run a query and create repeator controls dynamically equal to no. of rows in the query Any idea I appreciate your help Regards Randall...more >>

Generat Random Number between 1 and 13
Posted by Andrew Banks at 3/22/2004 2:23:56 PM
How can I generate random number between 1 and 13 inclusive. I''m doing this at the moment by calling the following private int PickCard() { Random RandomGenerator = new Random(); int RandomNumber = new int(); RandomNumber = RandomGenerator.Next(1, 14); return RandomNumber...more >>

Datagrid problem :(
Posted by news.skynet.be at 3/22/2004 2:20:28 PM
Hi; I have the following code: (...) Sub MyDataGrid_Edit(sender As Object, e As DataGridCommandEventArgs) MyDataGrid.EditItemIndex = e.Item.ItemIndex BindGrid() End Sub 'MyDataGrid_Edit Sub MyDataGrid_Cancel(sender As Object, e As DataGridCommandEventArgs) ...more >>

Application Data
Posted by JB at 3/22/2004 2:17:03 PM
I'm using Application.Add to put some global variables for and ASP.NET page, yet sometimes they work and then all of the sudden, I've got "object not set to instance of an object" all all of the Application variables where I request them. Any reasons for this? JB ...more >>

Return DataReader From Method; Good or Bad Practice?
Posted by Jeff S at 3/22/2004 2:08:32 PM
I want to instantiate my DAL class within a presentation-layer class, and have methods in the the DAL return a DataReader. I have seen a number of posts in this newsgroup that recommended one to never return a DataReader from a method. The reasoning given is to prevent memory leaks. Sounds good....more >>

Post Stream
Posted by Peter Lapic at 3/22/2004 1:41:12 PM
The following function returns a stream in text as a result of a URL I pass. The problem I have is if a URL returns a client side post (see example below) I want to be able to pass this stream back and have returned another stream which is the result of that post. I am just not sure how to handl...more >>

Checking if URL parameter exists
Posted by Andrew Banks at 3/22/2004 1:33:57 PM
How can I check if a URL parameter exists before trying to do something If(Request.QueryString("Whatever") EXISTS??) { DoSomething(); } ...more >>

Retrieving a file from a different machine to a ASP.NT web site
Posted by Hrvoje Vrbanc at 3/22/2004 1:28:57 PM
Hello all, I have already once posted something similar but somehow the results proved inconclusive so I have to ask again :-) What paths should I use if I want to retrieve the files located on the file system on another computer (not my web server)? I would like to get a list of files within...more >>

Custom control viewstate lost in Datagrid
Posted by cfang NO[at]SPAM telamon-corp.com at 3/22/2004 1:25:06 PM
I am trying to create a sort of toggle button custom control. What I did is to inherit an ImageButton, add a Viewstate field to rememer its own state. When the button is clicked it will toggle its image. It works fine standalone, but once I put it into the header of a datagrid, the toggle button...more >>

library application
Posted by Rod Snyder at 3/22/2004 12:25:25 PM
I know there are a lot of sample apps out there so I thought I would ask. I'm looking to put together a small library application for sharing books in our bureau, and was wondering if there is anything available to get me started. Rod ...more >>

How can I ge current role name???
Posted by Àä×ÔȪ at 3/22/2004 12:18:10 PM
I design my project base on roles FormsAuthentication. with following config: <location path="other"> <system.web> <authorization> <allow roles="vip"/> <allow roles="mov"/> <deny users="*" /> </authorization> ...more >>

Question: broadcast messages?
Posted by VB Programmer at 3/22/2004 12:02:01 PM
I want to allow an administrator of my website to send out a broadcast-type message to everyone who is currently viewing a certain webpage. Is this possible? FYI: This is an intranet asp.net website. Ex: Admin wants to send out a message: "If you are viewing this page at this very moment,...more >>

is this a good way if I make a sql connection in global.aspx?
Posted by Quentin Huo at 3/22/2004 11:56:27 AM
Hi: Almost all my pages get data from the database, so is it a good way that open a sql connection when application starts in the global.aspx, like this: protected void Application_Start(Object sender, EventArgs e) { SqlConnection conn = new SqlConnection("......"); conn.Open(); A...more >>

Adding a command button to a datagrid
Posted by Jim Mace at 3/22/2004 11:51:08 AM
Group I am creating and binding my data columns of my datagrid at runtime, and I would like to know how to add a command button to a new column, and when clicked, it needs to fire in a method. Any information would be greatly appreciate Thanks Ji Flying Ace Digital Solution www.jimmace.co ...more >>

How to invoke a class that has been added to the Global Assembly Cache from semi-trusted application
Posted by 6tc1 NO[at]SPAM qlink.queensu.ca at 3/22/2004 11:24:46 AM
Hi all, I've gone through and given my .dll (generated from a VB application) a strong name via: <Assembly: AssemblyKeyFileAttribute("..\\Testkey.snk")> and ensured that partially trusted callers can invoke my dll using: <Assembly: AllowPartiallyTrustedCallers()> However, now I realize, I...more >>

editing file attributes
Posted by Philip Townsend at 3/22/2004 11:20:31 AM
I need for a script to modify the last access time of my web.config file in order to trigger the application to restart. Can anyone point out how to do this? Thanks... *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!...more >>

Best practices for using <%...%> in ASP.Net
Posted by Dan at 3/22/2004 11:05:54 AM
I started coding with ASP.Net a little while ago and am trying to find the right balance of when to use classic ASP (<%...%>) style scripting. I originally tried to code all server-side logic with the code-behind page, with certain databinding exceptions (repeater control etc.), but now am rec...more >>

the difference between Server.HtmlDecode and Server.HtmlEncode
Posted by smen at 3/22/2004 10:56:07 AM
hiye guys, i've read the documentation and i dont really understand the difference between these two Server.HtmlDecode and Server.HtmlEncode. can someone plz clear the air for me thank smen...more >>

Disabling back button
Posted by Boris Condarco at 3/22/2004 10:49:14 AM
Hi gurus... I need to disable the back button of the IE as soon as the user gets the some page. Is that posible ? thanx Boris ...more >>

ContentType Issues w/Page Titles
Posted by Jeffrey A. Voigt at 3/22/2004 10:48:28 AM
Currently, if I change content type to word and send trough the stream a word document, the page title shows [aspx page name - Microsoft Word]. Is there any way I can change that in the code to the file name that I'm sending through the stream? Here is the code in question. Response.Conten...more >>

How to control SmartNavigation based on postback context?
Posted by Peter Rilling at 3/22/2004 10:47:20 AM
I have a page that, on different postbacks, have different contexts. For example, a listbox would postback so that it can update data in the form while the Save button would save the contents. Because there are different contexts, I want SmartNavigation to be dependent on the context. If a pe...more >>

datalist images
Posted by Brent Burkart at 3/22/2004 10:23:49 AM
I have a datalist which contains images. I would like to resize these images after the databind. I have a resize routine, but I am not sure how to iterate through the datalist and resize these images. Has anyone done this before? Any help is appreciated. Thanks, Brent ...more >>

Can I prevent a Refresh on a page?
Posted by Trint Smith at 3/22/2004 10:21:24 AM
I have a page that is on an auction site. If you refresh the page, it doubles the bid amount someone has in a textbox...Before this site goes live, I have to fix this. Any help is appreciated. Thanks, Trint .Net programmer trintsmith@hotmail.com *** Sent via Developersdex http://www.dev...more >>

ASP.net vs Classic ASP.
Posted by G at 3/22/2004 10:21:14 AM
Not tried ASP.net yet, but what are the main, obvious, super dooper features of .NET which should make me want to upgrade my Classic ASP sites? Thanks! Gary. ...more >>

Using cookies to store user authentication
Posted by Simon Harvey at 3/22/2004 10:15:15 AM
Hi everyone, I'm trying to get my head around the best way to work with Forms Authentication. At the moment I think I'm looking at using a cookie to store the authTicket that I'll create when a user logs in successfully. The one thing I'm wondering is, if the user has a cookies switched off,...more >>

create vb array of webform textbox controls?
Posted by Rich at 3/22/2004 10:14:00 AM
Hello, I have a webform with 10 textbox (input) controls that I would like to loop through to add data to a datasource. In vb.net I say Dim arrTxt As Textbox() = New Textbox() {txt1, txt2,...} --- then loop through the array to put data from textboxes into a datarow I am trying to do t...more >>

Cancelling postback with JavaScript
Posted by Steve Peterson at 3/22/2004 10:09:55 AM
Hi I have a asp button on a page. This button, on it's btnDelete_Click() event in the code behind will delete a record from the db. What I would like to do is put in some sort of JavaScript that will present a "Confirm" message box. If the user presses cancel, then nothing happens, or rather t...more >>

how can I best create a rich-text input field in ASP.NET, like in hotmail
Posted by Leo Muller at 3/22/2004 9:57:27 AM
Hi, What is the best way of creating a text area with rich text functions, like in Hotmail for instance. I use something similair in ASP 3, but in consists of lots of Javascript, iframes and other complicated matters. I am sure there must be an existing control out there that can do it. ...more >>

Access user control from another user control
Posted by Dan at 3/22/2004 9:40:53 AM
Hi I have a scenerio where I need to fire an event in one user control, by clicking a button in another user control. However, I need to do this without using an event code in the .aspx file. Is this possible? For example: Webform1.aspx contains 2 user controls: 1. SearchBox (some text...more >>

can I remove the X-Powered-By:ASP.NET HTTP header?
Posted by Leo Muller at 3/22/2004 9:36:23 AM
Hi, After installing the 1.1 Framework on windows 2000 I noticed that the installation added a HTTP header to all the websites: X-Powered-By:ASP.NET. Does anyone know why the installation added this header? Can I remove it, or will I regret that? Thanks, Leo ...more >>

web.config not updating
Posted by Mark at 3/22/2004 9:29:32 AM
I have a web.config value that I have updated, but the new value isn't being reflected in my application. 1. VS.NET 2003 Professional with 1.1 framework. 2. While I don't believe it's relevant, the problematic line is the one below. I just updated the password and it keeps displaying the OLD ...more >>

ASPX if then else syntax
Posted by Craig Buchanan at 3/22/2004 9:12:17 AM
I would like to have logic like this in my aspx page: <% If DataBinder.Eval(Container, "DataItem.TypeId")=1 Then %> <A href='objects.aspx?id=<%# DataBinder.Eval(Container, "DataItem.Id") %>'> <%# DataBinder.Eval(Container, "DataItem.Title") %> </A> <% Else %> <A href='javascript:View("?i...more >>

Datagrid Update Problem
Posted by Ben Arthur at 3/22/2004 8:40:15 AM
Hi All, I have a datagrid with one column as editable, and on edit command, the column shows a textbox where users can make changes.However, my data for that column is expected to be a couple of lines evyertime, and so i would prefer to display a text area or something more approproate...ho...more >>

'System.Data.Common.DbDataRecord' does not contain a property with the name PRODUCT_NAME.
Posted by aaron NO[at]SPAM radich.com at 3/22/2004 7:52:57 AM
I'm trying to use a populate a asp:Repeater with a DataReader control. When I try to reference the bound data column like this: <asp:Repeater id="rptProductButtonList" runat="server"> <ItemTemplate> <tr valign="middle"> <td align="center"> <%# DataBinder.Eva...more >>

File download: Fails (memory problem?) w/large files...
Posted by Steve E. at 3/22/2004 7:52:04 AM
Hi, My application displays a list of files for download. The files themselves are kept out of web scope, as this is a password-protected application and only some folks are allowed access to the files. The problem is that, with large files (say 150MB), the download will fail, giving a "Serv...more >>

popup page in aspx
Posted by newbie at 3/22/2004 7:31:12 AM
I have a web form written in aspx. with codes behind in vb. on the submit button, the data is save in the db and also open another page. I write javascript on aspx page. and ButtonAdd.Attributes.Add("onClick", "doPopup();") on the vb code, but nothing happen. page does not open. anyhelp will be...more >>

Web form(.aspx)??
Posted by grawsha2000 NO[at]SPAM yahoo.com at 3/22/2004 6:28:46 AM
Greetings, Can I include web forms(.aspx) in another web form just like user-control(.ascx)? If so, how please??? Adel...more >>

Is there a way to store data in the context of a class library?
Posted by bjaburg NO[at]SPAM virtual-affairs.com at 3/22/2004 4:33:42 AM
I have a class library and a web app. The web app is using objects from the class lib. I'd like to save data of previously retrieved data in the class lib, so that the next time i get data from the object it gets it from its "cache" as opposed to get it from the database again. The System.Web....more >>

Runat = "server"
Posted by Jim Heavey at 3/22/2004 4:17:11 AM
I have a Placeholder control. I add a Link Button in code to the place holder. I set the "ID" value of the LinkButton. When I run, I get the following error "Control 'lnkItem0' of type 'LinkButton' must be placed inside a form tag with runat=server". I do not see a property for "Runat", ...more >>

ASP.NET unmanaged Code, pure C and session
Posted by joachim.dehm NO[at]SPAM gmx.de at 3/22/2004 3:50:56 AM
Hello, have old C code, that I wan't to use in a ASP.NET application. In this C Code we use a lot of global and static vairables. For use this old code in ASP.NET I write a unmanged C++ library. Now I can use the C code with ASP.NET (C++ ME Wrapper). The problem is, that all Session now use...more >>

Adding New Controls to a Placeholder
Posted by Jim Heavey at 3/22/2004 3:48:04 AM
If I have a Placeholder in which I want to add controls to it based upon some action. If I add a ASP.Net Table and create a Row and then a Cell and add a Link Button to that cell. My questions are: 1. I just want to confirm my code for adding a control into a cell and setting the event...more >>

HttpModules
Posted by Peter Morris at 3/22/2004 3:23:05 AM
Hi, just learning C# ASP.Net programming, and there's something I don't understand. The book lists a program, and says to put in in the /bin directory, plus a code fragment to insert into the web.config file. The book says this will insert a comment with a timestamp at the start and end of any...more >>

Tiers?
Posted by Jacob Pedersen at 3/22/2004 1:35:34 AM
Hello I have searched in vain for info on how to seperate database layer from presentation layer in WebMatrix. I simply cannot get it to include my .CS file (containing some selfmade classes) in my aspx. Can anyone guide me to do this? -- Jacob Pedersen ...more >>

Session_End Never execute
Posted by L.J.SONG at 3/22/2004 12:03:54 AM
Hi guys. After more than 1 year's experenice of asp.net... I never found Session_end event had been triggerd in my projects. Who can tell me why? Thanks ...more >>


DevelopmentNow Blog