Showing posts with label table. Show all posts
Showing posts with label table. Show all posts

Monday, March 26, 2012

Strange CSS problem

I have a DotNet Table (asp:Table)
in that table, I have multiple rows and cells, of course -
One table cell is designated for 'content' -
I originally had just assigned a style inline with the tag:
<asp:TableCell Width="615" align="Left" valign="Top" Style="BORDER-TOP:
#000000 2px solid;" ID="ContentCell">
This worked fine.

However, the owners of the page decided it needed a change - on the click of
a button, the styles, etc for the page needed to be changed for the
implementation they needed (long story - won't bore you with that)

so - the page already had a stylesheet linked to it - so I created a new
class:
..TopBorder2 {BORDER-TOP: #000000 12px solid;}

then, I changed the cell to :
<asp:TableCell Width="615" align="Left" valign="Top" CssClass="TopBorder2"
ID="ContentCell"
At this point, I also created a TopBorder0 class, to blank out that border
on the button click...great idea - right?
The CssClass attribute wasn't available at all...I've tried moving it to
the Page_Prerender, the Page_load and included it in the tag itself - it
never rendered to the page

any ideas?when in doubt resort to the tried and true method...
..Attributes.Add("class","TopBorder1")

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Elmo Watson" wrote:

> I have a DotNet Table (asp:Table)
> in that table, I have multiple rows and cells, of course -
> One table cell is designated for 'content' -
> I originally had just assigned a style inline with the tag:
> <asp:TableCell Width="615" align="Left" valign="Top" Style="BORDER-TOP:
> #000000 2px solid;" ID="ContentCell">
> This worked fine.
> However, the owners of the page decided it needed a change - on the click of
> a button, the styles, etc for the page needed to be changed for the
> implementation they needed (long story - won't bore you with that)
> so - the page already had a stylesheet linked to it - so I created a new
> class:
> ..TopBorder2 {BORDER-TOP: #000000 12px solid;}
> then, I changed the cell to :
> <asp:TableCell Width="615" align="Left" valign="Top" CssClass="TopBorder2"
> ID="ContentCell">
> At this point, I also created a TopBorder0 class, to blank out that border
> on the button click...great idea - right?
> The CssClass attribute wasn't available at all...I've tried moving it to
> the Page_Prerender, the Page_load and included it in the tag itself - it
> never rendered to the page
> any ideas?
>
if the button click only need to change styles (if you are currently posting
back only to change the style) javascript would be the best solution...

<script>
function ChangeStyle()
{
document.getElementById("ContentCell").className = "TopBorder0";
}
</script
calling this client side function on button click will change the style

"Elmo Watson" wrote:

> I have a DotNet Table (asp:Table)
> in that table, I have multiple rows and cells, of course -
> One table cell is designated for 'content' -
> I originally had just assigned a style inline with the tag:
> <asp:TableCell Width="615" align="Left" valign="Top" Style="BORDER-TOP:
> #000000 2px solid;" ID="ContentCell">
> This worked fine.
> However, the owners of the page decided it needed a change - on the click of
> a button, the styles, etc for the page needed to be changed for the
> implementation they needed (long story - won't bore you with that)
> so - the page already had a stylesheet linked to it - so I created a new
> class:
> ..TopBorder2 {BORDER-TOP: #000000 12px solid;}
> then, I changed the cell to :
> <asp:TableCell Width="615" align="Left" valign="Top" CssClass="TopBorder2"
> ID="ContentCell">
> At this point, I also created a TopBorder0 class, to blank out that border
> on the button click...great idea - right?
> The CssClass attribute wasn't available at all...I've tried moving it to
> the Page_Prerender, the Page_load and included it in the tag itself - it
> never rendered to the page
> any ideas?
I just tried:
ContentCell.Attributes.Add("class","TopBorder2")
in Page_load, but it didn't render to the page...

what am I missing?

"Curt_C [MVP]" <software_at_darkfalz.com> wrote in message
news:1E9E8E4D-255D-4E37-BF6B-C67D2C9BA13D@.microsoft.com...
> when in doubt resort to the tried and true method...
> .Attributes.Add("class","TopBorder1")
> --
> Curt Christianson
> site: http://www.darkfalz.com
> blog: http://blog.darkfalz.com
>
> "Elmo Watson" wrote:
>> I have a DotNet Table (asp:Table)
>> in that table, I have multiple rows and cells, of course -
>> One table cell is designated for 'content' -
>> I originally had just assigned a style inline with the tag:
>> <asp:TableCell Width="615" align="Left" valign="Top" Style="BORDER-TOP:
>> #000000 2px solid;" ID="ContentCell">
>> This worked fine.
>>
>> However, the owners of the page decided it needed a change - on the click
>> of
>> a button, the styles, etc for the page needed to be changed for the
>> implementation they needed (long story - won't bore you with that)
>>
>> so - the page already had a stylesheet linked to it - so I created a new
>> class:
>> ..TopBorder2 {BORDER-TOP: #000000 12px solid;}
>>
>> then, I changed the cell to :
>> <asp:TableCell Width="615" align="Left" valign="Top"
>> CssClass="TopBorder2"
>> ID="ContentCell">
>>
>> At this point, I also created a TopBorder0 class, to blank out that
>> border
>> on the button click...great idea - right?
>> The CssClass attribute wasn't available at all...I've tried moving it to
>> the Page_Prerender, the Page_load and included it in the tag itself - it
>> never rendered to the page
>>
>> any ideas?
>>
>>
>
runat=server

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"David Wier" wrote:

> I just tried:
> ContentCell.Attributes.Add("class","TopBorder2")
> in Page_load, but it didn't render to the page...
> what am I missing?
>
> "Curt_C [MVP]" <software_at_darkfalz.com> wrote in message
> news:1E9E8E4D-255D-4E37-BF6B-C67D2C9BA13D@.microsoft.com...
> > when in doubt resort to the tried and true method...
> > .Attributes.Add("class","TopBorder1")
> > --
> > Curt Christianson
> > site: http://www.darkfalz.com
> > blog: http://blog.darkfalz.com
> > "Elmo Watson" wrote:
> >> I have a DotNet Table (asp:Table)
> >> in that table, I have multiple rows and cells, of course -
> >> One table cell is designated for 'content' -
> >> I originally had just assigned a style inline with the tag:
> >> <asp:TableCell Width="615" align="Left" valign="Top" Style="BORDER-TOP:
> >> #000000 2px solid;" ID="ContentCell">
> >> This worked fine.
> >>
> >> However, the owners of the page decided it needed a change - on the click
> >> of
> >> a button, the styles, etc for the page needed to be changed for the
> >> implementation they needed (long story - won't bore you with that)
> >>
> >> so - the page already had a stylesheet linked to it - so I created a new
> >> class:
> >> ..TopBorder2 {BORDER-TOP: #000000 12px solid;}
> >>
> >> then, I changed the cell to :
> >> <asp:TableCell Width="615" align="Left" valign="Top"
> >> CssClass="TopBorder2"
> >> ID="ContentCell">
> >>
> >> At this point, I also created a TopBorder0 class, to blank out that
> >> border
> >> on the button click...great idea - right?
> >> The CssClass attribute wasn't available at all...I've tried moving it to
> >> the Page_Prerender, the Page_load and included it in the tag itself - it
> >> never rendered to the page
> >>
> >> any ideas?
> >>
> >>
> >>
>

Thursday, March 22, 2012

Strange NULL value behaviour / RequiredFieldValidator

Hi everyone,

Im puzzled by a NULL behaviour in SQL 2000 server.

There is a column in the table that does not allow NULL.

During data mining, the staff noted that, for that particular column, there
are a few records that are empty.

I do not specifically know whether they are "alt + 0160" character.

What are the reasons that can cause this to happen?

Validation front end, I've used ASP.NET's REQUIREDFIELDVALIDATOR on the
control to ensure that the field is compulsory

On the application scripting, I've the following to cleanse the data before
the data goes into the database:

cmd.Parameters.Add("@dotnet.itags.org.STREET_NAME", Data.SqlDbType.VarChar)
cmd.Parameters("@dotnet.itags.org.STREET_NAME").Value =
ReplaceSingleQuote(streetname.Text.Trim())

The function is:

Public Shared Function ReplaceSingleQuote(ByVal x As String)

If x = "" Then
Return x
End If

x = x.Replace("'", "''")
Return x

End Function

Posted Via Usenet.com Premium Usenet Newsgroup Services
------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
------------------
http://www.usenet.comHowdy,

I see you're using Parameters so you don't need to replace any characters as
SqlParameter is responsible for that. It's only required if you build queries
through concatenation. I suspect all single quotes have been turned to doule
quotes (see it in the database). Anyway, it seems there's something wrong
with your validation as empty entries are submited.

Regards
--
Milosz

"Eric Layman" wrote:

Quote:

Originally Posted by

Hi everyone,
>
Im puzzled by a NULL behaviour in SQL 2000 server.
>
There is a column in the table that does not allow NULL.
>
During data mining, the staff noted that, for that particular column, there
are a few records that are empty.
>
I do not specifically know whether they are "alt + 0160" character.
>
What are the reasons that can cause this to happen?
>
>
Validation front end, I've used ASP.NET's REQUIREDFIELDVALIDATOR on the
control to ensure that the field is compulsory
>
On the application scripting, I've the following to cleanse the data before
the data goes into the database:
>
cmd.Parameters.Add("@.STREET_NAME", Data.SqlDbType.VarChar)
cmd.Parameters("@.STREET_NAME").Value =
ReplaceSingleQuote(streetname.Text.Trim())
>
The function is:
>
Public Shared Function ReplaceSingleQuote(ByVal x As String)
>
If x = "" Then
Return x
End If
>
x = x.Replace("'", "''")
Return x
>
End Function
>
>
>
>
>
Posted Via Usenet.com Premium Usenet Newsgroup Services
------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
------------------
http://www.usenet.com
>


Thanks for the reply.

That's very weird.

I have no idea how to account for the blank columns!

She showed me the sql commands and that column is specifically set to NOT
NULL

She asked me "How did you do that?"

"Milosz Skalecki [MCAD]" <mily242@.DONTLIKESPAMwp.plwrote in message
news:F8096D27-F0D9-430B-9166-75518B2F4F98@.microsoft.com...

Quote:

Originally Posted by

Howdy,
>
I see you're using Parameters so you don't need to replace any characters
as
SqlParameter is responsible for that. It's only required if you build
queries
through concatenation. I suspect all single quotes have been turned to
doule
quotes (see it in the database). Anyway, it seems there's something wrong
with your validation as empty entries are submited.
>
Regards
--
Milosz
>
>
"Eric Layman" wrote:
>

Quote:

Originally Posted by

>Hi everyone,
>>
>Im puzzled by a NULL behaviour in SQL 2000 server.
>>
>There is a column in the table that does not allow NULL.
>>
>During data mining, the staff noted that, for that particular column,
>there
>are a few records that are empty.
>>
>I do not specifically know whether they are "alt + 0160" character.
>>
>What are the reasons that can cause this to happen?
>>
>>
>Validation front end, I've used ASP.NET's REQUIREDFIELDVALIDATOR on the
>control to ensure that the field is compulsory
>>
>On the application scripting, I've the following to cleanse the data
>before
>the data goes into the database:
>>
>cmd.Parameters.Add("@.STREET_NAME", Data.SqlDbType.VarChar)
>cmd.Parameters("@.STREET_NAME").Value =
>ReplaceSingleQuote(streetname.Text.Trim())
>>
>The function is:
>>
> Public Shared Function ReplaceSingleQuote(ByVal x As String)
>>
> If x = "" Then
> Return x
> End If
>>
> x = x.Replace("'", "''")
> Return x
>>
> End Function
>>
>>
>>
>>
>>
> Posted Via Usenet.com Premium Usenet Newsgroup Services
>------------------
> ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
>------------------
> http://www.usenet.com
>>


>


Posted Via Usenet.com Premium Usenet Newsgroup Services
------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
------------------
http://www.usenet.com
Hi Eric again,

Correct me if I'm wrong but you (or she) is confusing empty string with
NULL. NULL is a special value that simply indicates nothing is assigned,
whilst empty string is a correct value. Setting NOT NULL constraint to a
varchar column means NULL value is not allowed, but any other values (like
empty string '') are. Also check if there is a default value set for this
column. Anyway, from the code you posted, I suspect, there aren't data access
layer or business logic layers as you assign values directly from user
controls. This may indicate, operations on the table are performed in several
places differently (different logic?). In addition, do you use stored
procedures or plain text queries? If SPs, please confirm there is no logic
inside that inserts empty string in some cases. And the last tip, have you
checked if there are any triggers created on this table?

Regards

--
Milosz

"Eric Layman" wrote:

Quote:

Originally Posted by

Thanks for the reply.
>
That's very weird.
>
I have no idea how to account for the blank columns!
>
She showed me the sql commands and that column is specifically set to NOT
NULL
>
She asked me "How did you do that?"
>
>
>
"Milosz Skalecki [MCAD]" <mily242@.DONTLIKESPAMwp.plwrote in message
news:F8096D27-F0D9-430B-9166-75518B2F4F98@.microsoft.com...

Quote:

Originally Posted by

Howdy,

I see you're using Parameters so you don't need to replace any characters
as
SqlParameter is responsible for that. It's only required if you build
queries
through concatenation. I suspect all single quotes have been turned to
doule
quotes (see it in the database). Anyway, it seems there's something wrong
with your validation as empty entries are submited.

Regards
--
Milosz

"Eric Layman" wrote:

Quote:

Originally Posted by

Hi everyone,
>
Im puzzled by a NULL behaviour in SQL 2000 server.
>
There is a column in the table that does not allow NULL.
>
During data mining, the staff noted that, for that particular column,
there
are a few records that are empty.
>
I do not specifically know whether they are "alt + 0160" character.
>
What are the reasons that can cause this to happen?
>
>
Validation front end, I've used ASP.NET's REQUIREDFIELDVALIDATOR on the
control to ensure that the field is compulsory
>
On the application scripting, I've the following to cleanse the data
before
the data goes into the database:
>
cmd.Parameters.Add("@.STREET_NAME", Data.SqlDbType.VarChar)
cmd.Parameters("@.STREET_NAME").Value =
ReplaceSingleQuote(streetname.Text.Trim())
>
The function is:
>
Public Shared Function ReplaceSingleQuote(ByVal x As String)
>
If x = "" Then
Return x
End If
>
x = x.Replace("'", "''")
Return x
>
End Function
>
>
>
>
>
Posted Via Usenet.com Premium Usenet Newsgroup Services
------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
------------------
http://www.usenet.com
>



>
>
>
Posted Via Usenet.com Premium Usenet Newsgroup Services
------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
------------------
http://www.usenet.com
>


Run a test to see if there are actually NULLs in that column. Run the
following query:

SELECT *
FROM MyTable
WHERE MyColumn IS NULL

If you return rows then you have some NULLs in there and we'll need to
investigate how you got NULLs into a non-nullable column. If no rows are
returned then the column does not contain NULLs, and you need to determine
how you got zero-length strings into the column if you're not expecting them
to be there. If zero-length strings are being stored but are not
acceptable, you can add a check constraint like the following to the column:

CHECK(LEN(MyColumn) 0)

"Eric Layman" <namyalcire[at no spam]gmail.comwrote in message
news:1175766804_1545@.sp6iad.superfeed.net...

Quote:

Originally Posted by

Thanks for the reply.
>
That's very weird.
>
I have no idea how to account for the blank columns!
>
She showed me the sql commands and that column is specifically set to NOT
NULL
>
She asked me "How did you do that?"
>
>
>
"Milosz Skalecki [MCAD]" <mily242@.DONTLIKESPAMwp.plwrote in message
news:F8096D27-F0D9-430B-9166-75518B2F4F98@.microsoft.com...

Quote:

Originally Posted by

>Howdy,
>>
>I see you're using Parameters so you don't need to replace any characters
>as
>SqlParameter is responsible for that. It's only required if you build
>queries
>through concatenation. I suspect all single quotes have been turned to
>doule
>quotes (see it in the database). Anyway, it seems there's something wrong
>with your validation as empty entries are submited.
>>
>Regards
>--
>Milosz
>>
>>
>"Eric Layman" wrote:
>>

Quote:

Originally Posted by

>>Hi everyone,
>>>
>>Im puzzled by a NULL behaviour in SQL 2000 server.
>>>
>>There is a column in the table that does not allow NULL.
>>>
>>During data mining, the staff noted that, for that particular column,
>>there
>>are a few records that are empty.
>>>
>>I do not specifically know whether they are "alt + 0160" character.
>>>
>>What are the reasons that can cause this to happen?
>>>
>>>
>>Validation front end, I've used ASP.NET's REQUIREDFIELDVALIDATOR on the
>>control to ensure that the field is compulsory
>>>
>>On the application scripting, I've the following to cleanse the data
>>before
>>the data goes into the database:
>>>
>>cmd.Parameters.Add("@.STREET_NAME", Data.SqlDbType.VarChar)
>>cmd.Parameters("@.STREET_NAME").Value =
>>ReplaceSingleQuote(streetname.Text.Trim())
>>>
>>The function is:
>>>
>> Public Shared Function ReplaceSingleQuote(ByVal x As String)
>>>
>> If x = "" Then
>> Return x
>> End If
>>>
>> x = x.Replace("'", "''")
>> Return x
>>>
>> End Function
>>>
>>>
>>>
>>>
>>>
>> Posted Via Usenet.com Premium Usenet Newsgroup Services
>>------------------
>> ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
>>------------------
>> http://www.usenet.com
>>>


>>


>
>
>
Posted Via Usenet.com Premium Usenet Newsgroup Services
------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
------------------
http://www.usenet.com

Strange NULL value behaviour / RequiredFieldValidator

Hi everyone,
Im puzzled by a NULL behaviour in SQL 2000 server.
There is a column in the table that does not allow NULL.
During data mining, the staff noted that, for that particular column, there
are a few records that are empty.
I do not specifically know whether they are "alt + 0160" character.
What are the reasons that can cause this to happen?
Validation front end, I've used ASP.NET's REQUIREDFIELDVALIDATOR on the
control to ensure that the field is compulsory
On the application scripting, I've the following to cleanse the data before
the data goes into the database:
cmd.Parameters.Add("@dotnet.itags.org.STREET_NAME", Data.SqlDbType.VarChar)
cmd.Parameters("@dotnet.itags.org.STREET_NAME").Value =
ReplaceSingleQuote(streetname.Text.Trim())
The function is:
Public Shared Function ReplaceSingleQuote(ByVal x As String)
If x = "" Then
Return x
End If
x = x.Replace("'", "''")
Return x
End Function
Posted Via mcse.ms Premium Usenet Newsgroup Services
----
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----
http://www.mcse.msHowdy,
I see you're using Parameters so you don't need to replace any characters as
SqlParameter is responsible for that. It's only required if you build querie
s
through concatenation. I suspect all single quotes have been turned to doule
quotes (see it in the database). Anyway, it seems there's something wrong
with your validation as empty entries are submited.
Regards
--
Milosz
"Eric Layman" wrote:

> Hi everyone,
> Im puzzled by a NULL behaviour in SQL 2000 server.
> There is a column in the table that does not allow NULL.
> During data mining, the staff noted that, for that particular column, ther
e
> are a few records that are empty.
> I do not specifically know whether they are "alt + 0160" character.
> What are the reasons that can cause this to happen?
>
> Validation front end, I've used ASP.NET's REQUIREDFIELDVALIDATOR on the
> control to ensure that the field is compulsory
> On the application scripting, I've the following to cleanse the data befor
e
> the data goes into the database:
> cmd.Parameters.Add("@.STREET_NAME", Data.SqlDbType.VarChar)
> cmd.Parameters("@.STREET_NAME").Value =
> ReplaceSingleQuote(streetname.Text.Trim())
> The function is:
> Public Shared Function ReplaceSingleQuote(ByVal x As String)
> If x = "" Then
> Return x
> End If
> x = x.Replace("'", "''")
> Return x
> End Function
>
>
> Posted Via mcse.ms Premium Usenet Newsgroup Services
> ----
> ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
> ----
> http://www.mcse.ms
>
Thanks for the reply.
That's very weird.
I have no idea how to account for the blank columns!
She showed me the sql commands and that column is specifically set to NOT
NULL
She asked me "How did you do that?"
"Milosz Skalecki [MCAD]" <mily242@.DONTLIKESPAMwp.pl> wrote in message
news:F8096D27-F0D9-430B-9166-75518B2F4F98@.microsoft.com...
> Howdy,
> I see you're using Parameters so you don't need to replace any characters
> as
> SqlParameter is responsible for that. It's only required if you build
> queries
> through concatenation. I suspect all single quotes have been turned to
> doule
> quotes (see it in the database). Anyway, it seems there's something wrong
> with your validation as empty entries are submited.
> Regards
> --
> Milosz
>
> "Eric Layman" wrote:
>
>
Posted Via mcse.ms Premium Usenet Newsgroup Services
----
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----
http://www.mcse.ms
Hi Eric again,
Correct me if I’m wrong but you (or she) is confusing empty string with
NULL. NULL is a special value that simply indicates nothing is assigned,
whilst empty string is a correct value. Setting NOT NULL constraint to a
varchar column means NULL value is not allowed, but any other values (like
empty string '') are. Also check if there is a default value set for this
column. Anyway, from the code you posted, I suspect, there aren’t data acc
ess
layer or business logic layers as you assign values directly from user
controls. This may indicate, operations on the table are performed in severa
l
places differently (different logic?). In addition, do you use stored
procedures or plain text queries? If SPs, please confirm there is no logic
inside that inserts empty string in some cases. And the last tip, have you
checked if there are any triggers created on this table?
Regards
Milosz
"Eric Layman" wrote:

> Thanks for the reply.
> That's very weird.
> I have no idea how to account for the blank columns!
> She showed me the sql commands and that column is specifically set to NOT
> NULL
> She asked me "How did you do that?"
>
> "Milosz Skalecki [MCAD]" <mily242@.DONTLIKESPAMwp.pl> wrote in message
> news:F8096D27-F0D9-430B-9166-75518B2F4F98@.microsoft.com...
>
> Posted Via mcse.ms Premium Usenet Newsgroup Services
> ----
> ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
> ----
> http://www.mcse.ms
>
Run a test to see if there are actually NULLs in that column. Run the
following query:
SELECT *
FROM MyTable
WHERE MyColumn IS NULL
If you return rows then you have some NULLs in there and we'll need to
investigate how you got NULLs into a non-nullable column. If no rows are
returned then the column does not contain NULLs, and you need to determine
how you got zero-length strings into the column if you're not expecting them
to be there. If zero-length strings are being stored but are not
acceptable, you can add a check constraint like the following to the column:
CHECK(LEN(MyColumn) > 0)
"Eric Layman" <namyalcire[at no spam]gmail.com> wrote in message
news:1175766804_1545@.sp6iad.superfeed.net...
> Thanks for the reply.
> That's very weird.
> I have no idea how to account for the blank columns!
> She showed me the sql commands and that column is specifically set to NOT
> NULL
> She asked me "How did you do that?"
>
> "Milosz Skalecki [MCAD]" <mily242@.DONTLIKESPAMwp.pl> wrote in message
> news:F8096D27-F0D9-430B-9166-75518B2F4F98@.microsoft.com...
>
> Posted Via mcse.ms Premium Usenet Newsgroup Services
> ----
> ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
> ----
> http://www.mcse.ms

Tuesday, March 13, 2012

Strange problem

Ok, I have this ASP.NET application I am making.

the main code is the updateTable(), this function populates a Table web control with rows of data, the last cell being a button, this button is attached an attribute to identify the row. A click event is attached to this button. The click event of this button fires the updateTable() again, using the attached attribute as the argument (sort of like a file structure, and the button says, enter this directory so it passes the directory name of that row, and reloads the table with the dir/files of that directory.

Now here is the problem, if I have my initial set root directory and updateTable(root dir) in the page_load, the click event fires correctly, but of course the updateTable gets called twice (which works as the click event is after the first one), but when you try to drill down a second time, it fouls it up because the path gets reset to the begining, and the new path doesn't exist there.

What I am trying to do is this.

Page_Load()

If (!Page.PostBack)
updateTable(Default Path)

Then have my button click event do

updateTable(myButton.Attributes["newDir"].ToString();

But with out the updateTable event firing on Page_Load, the click event does not get handled.

Hopefully this makes sense, if need more info, let me know.I been playing around with this problem for a bit tonight. And I made some changes.

I made the button click event simple set Session["currentDir"] and changed the Page_Load to call updateTable(Session["currentDir"].ToString(); and in the !Page.PostBack clause, I have it setting Session["currentDir"] to the application parameter setting for "rootDir" I have.

Now everything works, but... You got to click twice on all the buttons and I can't seem to figure out how to avoid that. The problem appears to be the click event doesn't fire until after the page is reloaded so the first time it has the last directory set, and changes the session variable, but will only update the table when you click it yet again.
It's a timing issue. You have to consider the fact that events are called after Load and before PreRender. Thus, if you make changes to the data from an event, you need to rebind the controls that depend on this data after you've made the change. Otherwise, the change will only be visible on the next postback (hence the "double click").
By the way, it's not a very good idea to use Session in this context.
Does this help?
How do you rebind the control, you mean attach the button handler to it again?

I tried doing it so that button event called the updateTable() function, but that didn't work unless the event fired in the beginning of page load, so I changed it to a session variable see if that helped. It make the thing work, but didn't solve the problem as now I have to click twice.
No, WhateverControl.DataBind();

The structure of your page should more or less be:

Init: create controls if necessary.
Load: read datasources and bind controls if not ispostback
Events: update data sources according to the event and rebind relevant controls.