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 > june 2004 > threads for thursday june 24

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

Simple Question on Table formating....
Posted by Veeresh at 6/24/2004 10:59:15 PM
Hello All, In the below code even though I specified 50% width for each TD, left side cell is not getting wraped after reaching 50%. How to make sure when my cell data is "/" to set to the required width ? How to make sure the left side data will be 50% wdth. If I use any other character it work...more >>


Cookies / Session for Login Info
Posted by google NO[at]SPAM joriz.is-a-geek.net at 6/24/2004 10:52:01 PM
Just one quick question. Im developing a site where user needs to login. My question is do i need to validate the login information like the password and username from the sql table everytime i switch and load pages? or probably theres another way to validate the pages are loading according to ...more >>

Adding a column to a datatable
Posted by Tina at 6/24/2004 10:51:15 PM
I'm doing this... Dim dt As New DataTable dt.Columns.Add("AreaGroup", Type.GetType("System.String")) dt.Columns.Add("Col1", Type.GetType("System.String")) dt.Columns.Add("Col2", Type.GetType("System.decimal")) it works ok when I specify System.String but when I specify System.decimal ...more >>

Outgoing Page DOM
Posted by Alfred Salton at 6/24/2004 9:52:24 PM
Can anyone confirm that asp.net provides no method for manipulating/modifiying the outgoing page using the document object model prior to sending it to the client? If I am wrong about this, can anyone tell me how to do it? ...more >>

help with repeater, how to code it in code-behind page
Posted by Tee at 6/24/2004 8:32:45 PM
Hi, I have a Repeater with a DataReader. I can successfully let the code run with something like this <asp:label id="testlabel" text='<%# DataBinder.Eval(Container.DataItem, "Name") %>' runat="server"></asp:label> but now I would like to code this few line ItemTemplate in my code-behind pa...more >>

dynamic user control properties
Posted by chrishill27 NO[at]SPAM yahoo.com at 6/24/2004 8:06:30 PM
novice question here... I am building a registration form while learning Asp.Net. I am having trouble passing data between "dynamically"-added server controls. To simplify, I have a single Registration.aspx page that contains 2 panels. Each panel is loaded with a user control during Page_L...more >>

use CompareValidator to validate date format
Posted by Neo at 6/24/2004 8:02:02 PM
I use CompareValidator to validate a date. But CompareValidator can only one date format at one time. if the dateorder is "mdy", date format can only be mdy even if date format is ymd. But users of a web application may be around the world and since database can accept many date format, so are...more >>

Basics of Javascript
Posted by Brian Shannon at 6/24/2004 6:46:46 PM
I want to begin learing java script to insert into my .NET applications. Are there any resources for .NET and java script? Also can someone help me with a simple example. Lets say you have 3 text boxes and 1 button. And values in the text boxes. textbox1=10 textbox2 =5 textbox3 button1...more >>



Random NOt random?
Posted by Darren Clark at 6/24/2004 6:12:17 PM
I do the following in code int count = randata.ProductTable.Rows.Count; Random r = new Random(); Random r2 = new Random(); int i = r.Next(1,count); int x = r2.Next(1,count); and i and x will always be the same.... how does that work? ...more >>

"The folder is no longer available" - it's got to be a VS.NET 2003 bug
Posted by Stan at 6/24/2004 6:00:25 PM
When I create a Web project and then try to add the files to it (Add Existing Item), I get this error message "The folder http://localhost/FinWeb is no longer availabe" In fact the folder and the virtual directory FinWeb both exist and project compiles just fine, but I cannot add the existi...more >>

Header JavaScript Write from Class?
Posted by localhost at 6/24/2004 5:55:17 PM
I have a complex ASPX page, and in the code-behind I instance an object that inherits from Class. Upon instantiation, I want the object to write some JavaScript code at the end of the HEAD tag, immediately before BODY begins. How can I do that? Thanks. ...more >>

Book recommendation
Posted by Griff at 6/24/2004 5:26:15 PM
I wish to buy a book to help me with the following "adventure". I've tried to specify what I need to achieve and my current level of ability. What I want to achieve: The decision has been made to completely replace an "enterprise-scale" eCommerce application using the .NET framework. It will...more >>

Server.HTMLEncode and performance
Posted by Michael Gaillez at 6/24/2004 5:12:51 PM
Hi, I'm dynamically loading an assembly into an ASP.NET application. In the control that I load from that dynamic assembly I've tried to use Server.HTMLEncode but this results in a serious performance loss. Is there anyone who knows why or is there an alternative for server.htmlencode method?...more >>

Help with Enter key and disabling button click
Posted by David Hearn at 6/24/2004 5:09:16 PM
I have a javascript function that is fired on the KeyDown event of a textbox. I am adding the attribute to the textbox at page load to run this javascript function. The javascript runs as expected and the text box that is specified in the javascript gets the focus set to it, but my problem is ...more >>

Handling events on automatically generated web controls
Posted by JezB at 6/24/2004 4:41:44 PM
I am dynamically creating WebControls and creating them on my page. Some of these are buttons, and I attach events to these buttons. The problem is these force a post-back, so I must regenerate all the webcontrols in the same way (I am assuming - am I right?). It was all working fine but now I...more >>

Securing XML file in an ASP.NET web app folder.
Posted by TK at 6/24/2004 4:17:22 PM
Hi, I have an ASP.NET web application and almost everything is working fine excepting failing to make an XML file be secure. There is an XML file which includes meta-data for both of server-side .NET application and client-side javascript application. And the meta-data in the XML file shoud be...more >>

validating user form input with vs.net/vb.net front end and backend
Posted by darrel at 6/24/2004 4:00:59 PM
I'm working on a contact form for our site. In the past (pre-asp.net), I'd make a form and validate it on the front end with javascript and then on the backend. With ASP.net, can I do this within vs.net easily using the built in controls, or should I just use HTML form elements and do it the...more >>

updateing aclient page when a server event occures
Posted by Jake at 6/24/2004 3:58:02 PM
Hi All I would like to have a specific area of content on an aspx page already loaded in a client browser update when the data in an SQL server changes. Would anyone have any ideas how to acheive this? Thanks in advance. Cheers Jake ...more >>

HELP! dropdown control is being reset to a value on every postback!
Posted by usenet_daughter NO[at]SPAM yahoo.com at 6/24/2004 3:49:40 PM
I don't know how this is happening, but a dropdown control I have is resetting to the 2nd value on the list anytime a postback occurs. I have no initiation code outside of If Not (IsPostBack) I have EnableViewState set to true for the control - the control stays populated, it just is l...more >>

TextBox Breaks and new lines
Posted by Jonathan Dixon at 6/24/2004 3:41:55 PM
I have a textbox and want to insert data into it from a datagrid like so TextBox2.Text = "Milestone ID: " + mileid; TextBox2.Text = TextBox2.Text + "Milestone Name: " + milestonename; TextBox2.Text = TextBox2.Text + "Milestone Description: " + description; TextBox2.Text = TextBox2.Text + "Mi...more >>

errorhandling with response.redirect
Posted by Roel at 6/24/2004 3:40:46 PM
Hello When I have an exception within a try - catch block, I sent the user to my error page with the following code: Response.Redirect(@"error.aspx?errmsg=" + ex.Message + "&errsource=" + ex.Source + "&errstack=" + ex.StackTrace); The problem is that when there is an \n - sign in the error ...more >>

faster joins
Posted by SKG at 6/24/2004 3:04:55 PM
I have two databases with in same sql server. I want to know whether a join of two tables with in same database is faster or than join of tables across two databases Thanks!!! ...more >>

Catch previous url in custom error page
Posted by Jason Zhou at 6/24/2004 3:00:42 PM
Hi, I have a question on how to get the previous url in custom error file. Here is what I am doing: If someone visit my website with a wrong file name or wrong directory name, IIS will automatically show error 404 page, this was setup by default in IIS web site properties/Custom Errors. I r...more >>

Sending XML Image
Posted by Rob T at 6/24/2004 2:19:34 PM
Hi, I'm trying to send an image over XML. My routine gets the name, then gets the image out of a SQL database. This part works fine... but the XML returns the object, I get the following error: "System.Drawing.Bitmap cannot be serialized because it does not have a default public constructor."...more >>

Web user controls
Posted by Ben at 6/24/2004 1:51:30 PM
Hi, I would like to use web user contols for header and footer controls. The problem I'm having is that we're using tables for layout. (thanks for any pro css solutions, but thats' a different thread :)) So in the header I want to output say.. <table><tr><td><script src="foo.js"></script></...more >>

Hit redirection & HTTP_REFERER
Posted by Troy at 6/24/2004 1:38:46 PM
Hi all, I have a hit counter that is utilized through a page on our webserver to track statistics on our clients internally. However, on the hitcounter page i do a server side re-direct on our server to the new URL. This does not however pass the HTTP_REFERER variable to our clients ...more >>

add Row to TOP of dataset?
Posted by Darren Clark at 6/24/2004 1:35:01 PM
is there a way to add a row to the TOP of a dataset? ...more >>

Javascript in code behind does not work..Please help?
Posted by grawsha2000 NO[at]SPAM yahoo.com at 6/24/2004 1:29:49 PM
Greetings, I have this javascript code in ASP.NET code behind: Dim str1 as string ="test" Private Sub Page_Load(byval sender as system.Obeject, byval e as system.eventargs)handles mybase.load Div1.attributes.add("onclick","alert(" & str1 & ")") End Sub when page loades and...more >>

Urgent... PLEASE Help!
Posted by Wardeaux at 6/24/2004 1:18:20 PM
Within last day, my asp.net projects have started loading REALLY slow, like I just loaded my project and it took over 20 mins (I finally aborted) to load when it used to take under 1 min. Everything else works fine. My network connection is fine(new network card and cables, other apps running ...more >>

Include In Project?
Posted by Jeremy at 6/24/2004 1:15:31 PM
I have a few folders required by my WebApplication that are not included - at least in the VS.NET IDE - in the VS project. Examples include a \Scripts folder that contains a few JavaScript files and a \LogFiles folder that contains log files that get updated at runtime by my application. Is th...more >>

Dynamically loading check box controls horizontally
Posted by mlr263 NO[at]SPAM netscape.net at 6/24/2004 12:42:18 PM
How can you do this using the placeholder control? When I call the add method, the check boxes show up, but they are displayed vertically. Should I be using the literal control? Any help would be appreciated. Stuart Miller...more >>

Problem getting cookie to be recognized by server
Posted by rss at 6/24/2004 12:29:17 PM
SUMMARY: ========== I am unable to pass along a simple Cookie obtained from a HttpWebRequest call (Machine A's ASP.NET app) so that another Web Server (Machine B) recongnizes the cookie. I have performed the exact steps [I am trying to do programmatically] by entering the URLs into the brows...more >>

Stylesheet question
Posted by JezB at 6/24/2004 12:16:48 PM
I want my imported stylesheets to completely control appearance, including the images that appear on Image and ImageButton webcontrols. Can this be done? I can only see an option to set the background-image, not the Image itself. ...more >>

Preventing multiple form submissions (multiple postbacks)
Posted by solenoidpowered NO[at]SPAM yahoo.com at 6/24/2004 12:04:49 PM
Hi- I am developing an ASP.NET application that can take a few seconds to process the request from the user. We are looking for a client-side solution that will prevent users from resubmitting the page multiple time in their irrational impatience. There are a few posts on this group which ...more >>

adding runat=server to a control on aspx page, don't cause the IDE to add the control to the code behind
Posted by z. f. at 6/24/2004 11:32:13 AM
Hi, adding a control with runat=server to an aspx page (using code - not designer view) - don't cause the control to be added to the code behind (.cs ot .vb file) only if i change the aspx view to designer and then to the HTML view again, the code behing is changed to add the controls with ...more >>

enableViewStateMac
Posted by A.M at 6/24/2004 11:03:37 AM
Hi, How can I turn on enableViewStateMac in all pages in the application in web.config rather than each single <@Page> directive? Thanks, Alan ...more >>

Viewstate
Posted by A.M at 6/24/2004 10:57:41 AM
Hi, Even I have <@Page ... enableViewState="False"> on top of the page, still my page result has this line in html source: <input type="hidden" name="__VIEWSTATE" value="dDwtNDA5MjAwODMzOzs+oEzHP8LaGy6LbKZFvbULn4iCHX8=" /> How can I completely disable ViewState ? Thanks, Alan ...more >>

Server Unavailable
Posted by Matt MacDonald at 6/24/2004 10:38:36 AM
Hi everybody, I've got some big problems today. I turned on my web server this morning and tried to access my site, and I got the following error in my browser: Server Application Unavailable The web application you are attempting to access on this web server is currently unavailable. Ple...more >>

viewstate in the URL?
Posted by Darren Clark at 6/24/2004 10:33:49 AM
why is the viewstate showing in the URL? and i have set the form method to be POST ...more >>

Application_start
Posted by stephen noronha at 6/24/2004 10:16:45 AM
Hi, I have a quick question. I am trying to figure out how does "application_start" fire when we call an application. I am developing a dot net application and when I set "Default.aspx" as the start page, how does the web server load this page? where are its parameters initialized? Thanks...more >>

Nested Tables and User Controls
Posted by Benign Vanilla at 6/24/2004 9:52:31 AM
I am using an HTML table to format my aspx page. In the top row, I have one row which holds a user control which is my site wide header. In the next row, I have two cells. The right cell contains a user control that contains ad space, and the left cell is to hold a user control that contains an H...more >>

How to Dynamically Link CSS file to an ASPX Page?
Posted by Jeremy at 6/24/2004 9:50:11 AM
Rather than hard-coding a reference to a css file in the HEAD of an aspx page, like this... <link rel="stylesheet" href="../css/admin.css" type="text/css"> How can I dynamically specify the particular css file to which the aspx page is to link at runtime? Thanks. ...more >>

User Control Postback
Posted by George Durzi at 6/24/2004 9:27:41 AM
I have a simple user control with a text box and a submit button. When the user enters some text into the textbox and clicks the submit button, a record is created in the database. I'm using this user control inside another webform. The webform has a "Next" button which is initially disabled. ...more >>

Need to upload a file from local machine without user interaction. Any ideas?
Posted by David Hearn at 6/24/2004 9:07:06 AM
I have a webform that I am creating. I need for the user to be able to pass it the path and name of a file on his/her local machine without any interaction. I don't want to have to use the file upload control. This will be an automated process on their end. They should only have to type the ur...more >>

Integrate VSS Username with Domain users
Posted by Grey at 6/24/2004 9:06:01 AM
Can I use the domain username and password with VSS authentication?? I want to user the domain username and password to authorize the credential of VSS, but I don't want to do anything the Domain AD. What can I do?? I learnt from VSS FAQ in microsoft website that "Can a network password be us...more >>

Padding between textboxes
Posted by Becker at 6/24/2004 8:33:45 AM
I want two asp:texbox controls to be exactly right beside one another with no padding or spacing between them. I am really struggling how to make this happen. Any ideas? Thanks, Ben ...more >>

File downloads to client
Posted by paul.gibson NO[at]SPAM i-stat.com at 6/24/2004 6:40:08 AM
A few weeks back, a message was posted regarding how to force a file download to a client. The code for this technique is shown at the end of this message. A question I have about this technique is how to gracefully get back to one's web app after doing the file download? Does one just do th...more >>

Merge cells
Posted by Mark Goldin at 6/24/2004 6:13:17 AM
How do I merge cells in a table? I am selecting two cells, but Merge cells is disasbled in a Popup menu. ...more >>

Resize table
Posted by Mark Goldin at 6/24/2004 6:07:15 AM
I am adding a table to my aspx page to keep things alligned. How can I resize columns and rows? In FrontPage I can do with a mouse. Cannot do that in VS. Any help? ...more >>

Writing xml to hdd
Posted by Asha at 6/24/2004 5:56:01 AM
how can i accomplish this task? from the dataset, i wan to transform it into an xml file and store it in the application server....more >>

Re: help with repeater, how to code it in code-behind page
Posted by Phil Winstanley [Microsoft MVP ASP.NET] at 6/24/2004 5:43:25 AM
Tee, What you'll need to do is wire up the OnItemDataBound event of the Repeater to a method, once you've done that inside the method you'll need to Dynamically add controls, as so: - void myRepeater_ItemDataBound() { e.Item.Controls.Add(new LiteralControl("Wibble!")); } Hth, Phil Win...more >>

Xml performance comparison
Posted by Asha at 6/24/2004 5:32:01 AM
hi.. regarding xml reading and writing I notice that there are two option to archive this operation which are XMLDocument, XMLElement and ReadXML, WriteXML. What are the major difference between these two? Any reply would greatly help. thanks ...more >>

Re: Merge cells
Posted by Phil Winstanley [Microsoft MVP ASP.NET] at 6/24/2004 5:26:54 AM
Mark, Take a look at the colspan and rowspan attributes of the Table Cell (Td). Hth, Phil Winstanley Microsoft ASP.NET MVP http://www.myservicescentral.com ...more >>

Re: Multiple aspx for one aspx.cs
Posted by Phil Winstanley [Microsoft MVP ASP.NET] at 6/24/2004 5:21:26 AM
Iain, You might want to take a look at the Templating of WilsonMasterPages: - http://authors.aspalliance.com/PaulWilson/Articles/?id=14 Hth, Phil Winstanley Microsoft ASP.NET MVP http://www.myservicescentral.com ...more >>

Trim Each textbox control
Posted by postings NO[at]SPAM alexshirley.com at 6/24/2004 4:18:47 AM
HI I'm trying to iterate through all the textboxes on a webpage and trim them for spaces. i.e. If a user enters " hello world " we correct it to "hello world" So far I've come up with this: ------------------------------------------------------------------------------- 'Trim all...more >>

how to case select with case-insensitive string ?
Posted by Tee at 6/24/2004 3:20:22 AM
Hi, How to case select with case-insensitive ? eg: Select Case Textbox1.Text Case "Hello" -- ( this will include "Hello", "HELLO", "hElLo" etc etc. ) Case "Bye" End Select anyone know how ? Thanks. ...more >>

Make a row invisible/not be shown when string = "blabla"
Posted by Richard at 6/24/2004 2:45:47 AM
After printing a userlist to a Datagrid i want some names not to be shown. I want to know how i can make a entire datagrid row invisible. I suspect its something with the OnItemDatabound but i am kinda stuck there. but this is basicly what i want. if Username = "Deleted_User" then 'make ...more >>

CDROM path
Posted by Aristeidis Bampakos at 6/24/2004 1:57:01 AM
I am calling an ASP .NET page through the Web, save it locally and then burn it on a CD. How can I determine the path of the CDROM in which the page resides since each user may have a different drive letter? Thanks...more >>

How to clear parameter out of url
Posted by moondaddy at 6/24/2004 12:53:34 AM
I'm passing a parameter in the url when I open up a particular page. When the page loads and finds this parameter, I know that I need to clear a variable out of the session cache and reset it with a new value. On the following postbacks I want this variable to remain constant which means I nee...more >>

Dropdown list
Posted by Andy Sutorius at 6/24/2004 12:17:58 AM
I have created a dropdown which is bound to a table. I need for the drop down list to have a blank in the first/top slot with a value of "0" instead of the first record of the table. In classic asp you would hard code an html option prior to the ado looping. Thanks Andy ...more >>

In Classic ASP it looked like...
Posted by Andy Sutorius at 6/24/2004 12:04:26 AM
In classic asp you can get at data from a db like this: I am <%=rs("height")%> feet tall How can this be accomplished in ASP.NET? What does the ADO.NET need to look like? Can it be done without "binding" to a datagrid, etc.? Thanks Andy ...more >>


DevelopmentNow Blog