Showing posts with label originally. Show all posts
Showing posts with label originally. 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 Issue - Help!

I have a strange problem and am not sure how to fix it so I need input.
I have a web application that was originally designed to have two pieces. An intranet based portion that would allow administration from within our intranet. And an internet portion for external facing customers. The purpose of the application was to simply allow a customer to download reports for viewing.
Initially I set everything up in one project. The intranet portion consisted of one default page with several user controls that would be loaded dynamically according to clicks in the navigation portion of the default page.
The internet portion consisted of a login page that would set a session variable once the user logged in succesfully. Then, once the login was complete, it would do a redirect to the applications main page which would allow the customer to choose various options for downloading their report. This download page would check the session variable to see if they would be able to view reports. While debugging I set the login page as my startup page for my project (b/c I developed the internet portion last, and it was the last part I was testing)
All of this worked fine. Here is the strange part. I decided to split up the project into two separate projects by pulling out all the internet pages and code.Now something is wrong with the intranet portion. When ever I run the intranet portion, it keeps wanting to redirect to the now phantom login.aspx page by redirecting to the following URL even after setting the startup page to the intranet portions default.aspx page. I have deleted the application DLLs, as well as the offline cache in Visual Studio 2003. I have also walked the code, and here is the sequence of events.

1. Application_AuthenticateRequest fires 2 times
2. The application then immediately shows the information below, without even firing the page_load event of the the (now startup page) default.aspx page.

I am stuck on this. Someone please help.

http://localhost/OMSA/login.aspx?ReturnUrl=%2fOMSA%2fdefault.aspx

Server Error in '/OMSA' Application.

The resource cannot be found.

Description:HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested Url:/OMSA/login.aspx

Do you have forms authentication turned on for the internet project?


Yup, that was the problem. Since i was developing both internetand intranet, I completely forgot to change the intranet web.configback to Windows instead of leaving it on Forms.

Ok, I have another issue with this application. Now I am getting the following error. Normally, all I have to do to fix this issue is simply do a delete then rebuild the applicaton DLLs and it usually works. In fact, the problem is that if I bring down all the souce code from source control and compile using Visual Studio 2003, the application works fine. However, we use NANT to build and deploy our application to the UA webservers. Whenever I do that, I get the error down below. Does anyone have any suggestions?

Server Error in '/GSPC_DEV/OMSA' Application.

Parser Error

Description:An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message:Could not load type 'OMSA.Global'.
Source Error:

Line 1: <%@. Application Codebehind="Global.asax.vb" Inherits="OMSA.Global" %>

Source File:E:\Inetpub\wwwroot\GSPC_DEV\OMSA\global.asax Line:1


Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032


fixed it. NANT was assigining the wrong root namespace whenddoing the build. Once that was fixed, everything worked fine.