Showing posts with label dotnet. Show all posts
Showing posts with label dotnet. Show all posts

Wednesday, March 28, 2012

Strange bugg with asp.net in Visual Studio

Hi,
I would appreciates some hints or help regarding a strange behaviour in
visual studio dotnet when using asp.net. I'm working with authentication
and somewhere in the process the framework goes nuts. Let me explain the
behaviour for you.
First you have a register page in the root of your project. Next you
have a folder named MemberPages and in this folder a login.aspx page.
And then you have welcome.aspx page.
You have a web.config and set restricion for anonymous users that
redirect to the login page.
If you compile and run the project you get the following error:
Could not load type 'GrundSys01.MemberPages.login'.
Ok and then you remove the login.aspx and rename the folder to MyPages
and then add a new login.aspx page and set it to start page.
Compile and run the project. Page displays fine.

Now why is that and what do I need to do?
I have tried to remove temporary files in framwork folder without
success.

I would appreciate if you could spend a little time to help me on this.

Regards
Andla

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!Hi Andla,
It looks like a namespace problem.Check your project
properties and the inherits property of the page
directive on your login page.

Regards
-Narayana
>--Original Message--
>Hi,
>I would appreciates some hints or help regarding a
strange behaviour in
>visual studio dotnet when using asp.net. I'm working
with authentication
>and somewhere in the process the framework goes nuts.
Let me explain the
>behaviour for you.
>First you have a register page in the root of your
project. Next you
>have a folder named MemberPages and in this folder a
login.aspx page.
>And then you have welcome.aspx page.
>You have a web.config and set restricion for anonymous
users that
>redirect to the login page.
>If you compile and run the project you get the following
error:
>Could not load type 'GrundSys01.MemberPages.login'.
>Ok and then you remove the login.aspx and rename the
folder to MyPages
>and then add a new login.aspx page and set it to start
page.
>Compile and run the project. Page displays fine.
>Now why is that and what do I need to do?
>I have tried to remove temporary files in framwork
folder without
>success.
>I would appreciate if you could spend a little time to
help me on this.
>Regards
>Andla
>*** Sent via Developersdex http://www.developersdex.com
***
>Don't just participate in USENET...get rewarded for it!
>.
Thanks for your answer.
I have tested different namespace adjustment without any success. Also
I'm not sure how this can be a namespace problem because that it fails
only if the folder name is MemberPages. Any other name do fine. Also I
have made a search for 'MemberPages' string in the root because I
suspected that this laid hidden somewhere. Any file containing this
string was either changed or deleted and still the same problem appeared
again.
Maybe I should check the registry and remove any key containing this
string.
Don't really know what more I can do.

Regards
Andla

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

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?
> >>
> >>
> >>
>