Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 29th, 2006, 07:30 AM
Registered User
 
Join Date: Mar 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Events not firing in IE

I've got a datalist which uses an update button to trigger the updatecommand
It works fine in Firefox, but when the same page is loaded in IE, the update button does nothing (also the logout button on the same page doesn't work)
The strange thing is that it does fire for some records, but most do nothing

Any ideas what might be going on?

  #2 (permalink)  
Old August 29th, 2006, 07:41 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

I have had a similiar problem using the EditItemCommand in Datagrids, though I ended up fixing the problem I can't remember what it was. (It was something extremely trivial)

What is the difference between the rows that work and the rows that don't?

Does the entire control work 100% correctly in Firefox?

What is the logout button doing/calling?

"The one language all programmers understand is profanity."
  #3 (permalink)  
Old August 29th, 2006, 08:51 AM
Registered User
 
Join Date: Mar 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks for your salient questions
i looked at the difference in records, and it appears the problem is being caused by the date textbox fields
when the DataBinder.Eval(Container.DataItem,"DepDate") is used to fill the textbox, there is a 00:00:00 inserted after the date (eg 29/09/2006 00:00:00 instead of the 29/09/2006 that is stored in the db)
when i remove the offending 00's, the update button fires

do i need to fill the textbox with some date format function?

  #4 (permalink)  
Old August 29th, 2006, 09:38 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Do something like this.

DateTime tempDT;
tempDT = dr["Edate"];
dr["EDate"] = String.Format(tempDT, "MM/dd/yyyy");

That should give you just the mmddyyy.

hth

"The one language all programmers understand is profanity."
  #5 (permalink)  
Old August 29th, 2006, 10:00 AM
Registered User
 
Join Date: Mar 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks- that should work, but it seems an unnecessary bit of code.
i would have though that a date would be displayed in the same way as in the db when bound to a textbox control.
would debugging have picked up on this problem?
  #6 (permalink)  
Old August 29th, 2006, 10:26 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

here is the thing:

I use a SQL Server 2000 backend to all of my applications, very rarely do I capture both the Date and Time of a specific action, I am more concerned with the date; problem is SQL Server stores the Date and time in one field as opposed to splitting it up so that if you send in a date value and no time, SQL sets the time field to its default (00:00:00:000). You have 2 options to return just the date information from a datetime field:

1. You can do something pragmatically in code like I have show you above
or
2. You can do something like this inside of your SQL Syntax/Stored Procedure:

convert(varchar(10), [datefield], 101)

which will return mm/dd/yyyy

Otherwise just doing a SELECT [datefield] From Table will return:

mm/dd/yyyy hh:mm:ss

and it will be displayed on your page as such.

hth

"The one language all programmers understand is profanity."
  #7 (permalink)  
Old August 29th, 2006, 01:18 PM
Registered User
 
Join Date: Mar 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks again- it's unlikely i'll have this issue again knowing this (although i'm actually using an access database)

even so, it is strange that the browser should make any difference (the problem records updated ok in firefox)
  #8 (permalink)  
Old August 29th, 2006, 01:32 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

A strange error indeed, but I have no insight as to why.

"The one language all programmers understand is profanity."
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with events not firing Keith Smith Excel VBA 2 August 3rd, 2016 05:39 PM
Events are not firing msrnivas .NET Web Services 14 April 21st, 2008 06:37 AM
Windows control events not firing bmains C# 2005 2 June 5th, 2006 09:11 PM
Events firing for control in one instance, but... thanie2001 ASP.NET 1.0 and 1.1 Professional 3 January 23rd, 2004 03:01 PM



All times are GMT -4. The time now is 05:47 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.