|
Nothing at all happens. It is as though I clicked on a word of text on the page. Nothing happens. The code in the OnClick event never fires, the data is not written, the image doesn't change.
Dana
|
|
|
|
|
Try using IE 9+ and pressing F12, then the bug button and run the page, see if an error is generated.
|
|
|
|
|
Thanks.
It actually did:
Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 0
Unknown error, code 0. Really helpful.
The wishlist button does not throw this error.
Dana
|
|
|
|
|
|
Yes, I did:
Protected Sub btnAddToCart_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs)
And the Add to Wishlist button:
Protected Sub btnAddToWishlList_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs)
Dana
|
|
|
|
|
You may have a response.write in the code somewhere that runs in the update panel
|
|
|
|
|
Nope. And as I said in the original post, it was working since 2013, and the page wasn't changed. It just suddenly started this recently. The button is the only thing in the update panel.
Dana
|
|
|
|
|
I am going to try this again, with a screen capture. After several attempts to fix this, I reverted to the original code and now I am getting an error in Visual Studio (this error wasn't there before).
OK, there seems to be no way to add an image to my post. that's kind of useless.
The error message is:
'btnAddToCart' is not a member of 'Danas3D_MarketplaceProduct'.
But it most certainly is. I am extremely confused about this. The other ImageButton is in the same kind of container, with one exception...I have removed the AJAX UpdatePanel that was wrapped around the btnAddToCart.
Please, someone must have seen this behavior at one time or another. I tried Build Page thinking it would update something. The error is in the code behind, in:
Protected Sub btnAddToCart_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs)
The line is:
oAddToCartBtn = Me.btnAddToCart
Please! This is driving me nuts! It makes no sense!
Dana
|
|
|
|
|
Hi all,
I have posted an article but its image links are broken. Can anybody from Approval team look it?
here is link of article.
www.codeproject.com/Tips/816581/Create-a-Class-Collection-of-another-Class-Extend
Thanks,
Prakash
|
|
|
|
|
Why are you posting this in the ASP.NET forum and not the Article Writing[^] forum?
|
|
|
|
|
Wrong forum, and i checked your Link[^] , it is working fine only.
So much complexity in software comes from trying to make one thing do two things.
Sibeesh
|
|
|
|
|
Hello
If I have this in the tags of my Site.master file:
<div class="navbar-collapse collapse">
<!--<ul class="nav navbar-nav">
<li><a runat="server" href="~/">Home</a></li>
<li><a runat="server" href="~/About">About</a></li>
<li><a runat="server" href="~/Contact">Contact</a></li>
</ul>-->
<asp:LoginView runat="server" ViewStateMode="Disabled">
<AnonymousTemplate>
<ul class="nav navbar-nav navbar-right">
<li><a runat="server" href="~/Account/Register">Register</a></li>
<li><a runat="server" href="~/Account/Login">Log in</a></li>
</ul>
..............
and this in the tags:
<link rel="stylesheet" type="text/css" href="logon.css">
Why can't my vb.net project see the logon.css file that I created:
.nav a:link { color: #ffffff; text-decoration: none; }
.nav a:hover { color: #ffffff; text-decoration: underline !important; }
and which appears in Solution Explorer (please see screenshot).
Basically, I am trying to change the colour of two links, 'Register' and 'Log on', to white.
Thank you.
|
|
|
|
|
You just drag the file from the solution explorer onto the web form in the head tag section and it will automatically build the correct link for CSS and JavaScript files.
It will just work.
Your link is wrong
|
|
|
|
|
Hello jkirkerx
Thanks for that advice. I didn't know about the dragging the file. Anyway, I did it and it has left the following in my tags:
<link href="logon.css" rel="stylesheet" />
Unfortunately, it has not changed the text colour link.
|
|
|
|
|
You have a CSS issue then
You can put a slash in front of the href, if the file is in the root of the web site folder.
<link href="/logon.css" rel="stylesheet" />
I not sure what your trying to do, I get that your trying to change the text color.
My typical CSS file looks like this
I call it a theme file, in which this file controls the theme of the web pages
The first 4 sections set the elements input, textarea, option, the next sets the elements html and body
One you set stuff globally, then you can fine tune other stuff by using ID names and Class Names
a img {border:none;}
input, textarea, option, .nobox{
background: transparent;
border: 0;
font-size: 100%;
margin: 0;
outline: 0;
padding: 0;
vertical-align: baseline;
}
html, body
{
margin: 0px auto;
color: #808080;
background: #383838;
font-family: Arial, Helvetica, sans-serif;
font-size: 80%;
font-size: 100%;
padding: 0 0 0 0px;
height: 100%;
}
.PageBackground
{
text-align: center;
}
#DefaultHeader_Wrapper_Home
{
background-image: url('/images/theme/bg-repeat_x_OtherDark.png');
background-repeat: repeat-x;
background-position: left top;
height: 800px;
width: 100%;
}
#DefaultHeader_Wrapper_Black
{
background-image: url('/images/theme/bg-repeat_x_OtherBlack.png');
background-repeat: repeat-x;
background-position: left top;
height: 800px;
width: 100%;
}
|
|
|
|
|
Thanks again for your reply.
Unfortunately,
<link href="/logon.css" rel="stylesheet" />
doesn't do anything.
If I use the same CSS in a normal HTML page like this:
http://www.bayingwolf.com/test.html[^]
It works.
The CSS Site.master attributes which govern those two links whose colour I want to change are these:
<div class="navbar-collapse collapse">
............
<asp:LoginView runat="server" ViewStateMode="Disabled">
<AnonymousTemplate>
<ul class="nav navbar-nav navbar-right">
<li><a runat="server" href="~/Account/Register">Register</a></li>
<li><a runat="server" href="~/Account/Login">Log in</a></li>
</ul>
Now, if I go to Chrome, click on Inspector, and search for navbar-right, I can see these and other CSS values in bootstrap (screenshot).
http://www.bayingwolf.com/PropertiesCSS_bootstrap.jpg[^]
Is it somewhere here that I need to make some changes?
|
|
|
|
|
Either program to the element A for hyper link
a:visited, a:active, a:link
{
color: rgb(255,255,255);
font-size: 1.0em;
font-weight: bold;
}
or assign a class name to the hyperlink
if you don't program the CSS for the A element, it will be purple by default after you click on it.
Blue for never used, purple for being used.
|
|
|
|
|
OK, I now have this in that logon.css file that I dragged into my tags in Site.master:
.nav a:link {color: #ffffff; text-decoration: none; }
.nav a:active {color: #ffffff; text-decoration: none; }
.nav a:visited {color: #ffffff; text-decoration: none; }
.nav a:hover { color: #ffffff; text-decoration: underline !important; }
a:visited, a:active, a:link
{
color: rgb(255,255,255);
font-size: 1.0em;
font-weight: bold;
}
http://www.bayingwolf.com/sameGrey.jpg[^]
Those two links are still that same grey colour.
Something, somewhere is simply preventing it from recognising my attempted to change the colour!
Thanks again for your time and patience.
|
|
|
|
|
I think it would be this way
but in the <a class="nav" >Register</a>
a.nav:link {color: #ffffff; text-decoration: none; }
a.nav:active {color: #ffffff; text-decoration: none; }
a.nav:visited {color: #ffffff; text-decoration: none; }
a.nav:hover { color: #ffffff; text-decoration: underline; }
|
|
|
|
|
Sorry, not sure I understand.
I know .nav in defined in the logon.css file, but how would I use
<a class="nav" >Register</a>
with
<li><a runat="server" href="~/Account/Register">Register</a></li>
<li><a runat="server" href="~/Account/Login">Log in</a></li>
|
|
|
|
|
<li><a runat="server" CssClass="nav" href="~/Account/Register">Register</a></li>
<li><a runat="server" CssClass="nav" href="~/Account/Login">Log in</a></li>
|
|
|
|
|
<li><a runat="server" CssClass="nav" href="~/Account/Register">Register</a></li>
<li><a runat="server" CssClass="nav" href="~/Account/Login">Log in</a></li>
<!--<li><a runat="server" href="~/Account/Register">Register</a></li>
<li><a runat="server" href="~/Account/Login">Log in</a></li>-->
Frustrating, I know, but the text links remain that dreary grey.
I might just have to leave them like that.
You have tried everything, thanks.
|
|
|
|
|
If I copy and paste this:
.nav a:link {color: #ffffff; text-decoration: none; }
.nav a:active {color: #ffffff; text-decoration: none; }
.nav a:visited {color: #ffffff; text-decoration: none; }
.nav a:hover { color: #ffffff; text-decoration: underline !important; }
a:visited, a:active, a:link
{
color: rgb(255,255,255);
font-size: 1.0em;
font-weight: bold;
}
into the tags of Site.master using the colour of the text links remains grey, but I noticed that the font had changed from normal to bold as in your 'font-weight: bold;', so something is happening, it's just not clear what exactly!
|
|
|
|
|
The latter example is global, in which all hyperlinks will adapt that style.
Something else in the css file is changing the color of the text, there is another section of the file that is changing the color like
html, Body
a
You can go inline css to override the css files commands and give that feeling of moving forward with it
|
|
|
|
|
Getting somewhere!
This:
<a runat="server" style="color: rgb(255,255,255); font-size: 1.0em; font-weight: normal; text-decoration: underline;" href="~/Account/Register">Register</a>
<a runat="server" style="color: rgb(255,255,255); font-size: 1.0em; font-weight: normal; text-decoration: underline;" href="~/Account/Login">Log in</a>
finally shows the text in white (underlined) due to the text-decoration.
|
|
|
|