|
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.
|
|
|
|
|
Apllay Specific folder Path
|
|
|
|
|
Thank you for your reply.
So something like this (according to examples I have seen elsewhere) as logon.css is in my Account folder:
link href="<%=ResolveUrl("~/Account/logon.css")%>"
Thanks again
|
|
|
|
|
Hi,
There is two dropdown list on page. One is for State and second one is for City related to that sate only.
I have added the Name of state in first dropdown list and would like to write programming in such a way so
that when I select the name of state the city related to that state adds automatically in second dropdown list.
I tried many code but all are giving error.
like
protected void State_DropDownList_SelectedIndexChanged(object sender, EventArgs e)
{
if (State_DropDownList.SelectedItem.Text == "Bihar")
{
City_DropDownList.Items.Add("Patna");
City_DropDownList.Items.Add("Gaya");
City_DropDownList.Items.Add("Aurangabad");
}
}
protected void State_DropDownList__TextChanged(object sender, EventArgs e)
{
if (State_DropDownList.SelectedItem.Text == "Bihar")
{
City_DropDownList.Items.Add("Patna");
City_DropDownList.Items.Add("Gaya");
City_DropDownList.Items.Add("Aurangabad");
}
but these codes are not working please help me.
I do not want to use database for that.
modified 21-Sep-14 8:36am.
|
|
|
|
|
enable autopostback option in dropdownlist (State_DropDownList) then check it will work
protected void State_DropDownList_SelectedIndexChanged(object sender, EventArgs e)
{
if (State_DropDownList.SelectedItem.Text == "Bihar")
{
City_DropDownList.Items.Add("Patna");
City_DropDownList.Items.Add("Gaya");
City_DropDownList.Items.Add("Aurangabad");
}
}
|
|
|
|
|
>Post Back Enabled true for both dropdown list but even then it is not working.
Please help me.
|
|
|
|
|
can you tell me following things
1. What kind of error you are receiving or issue are facing
2.select index change Event is calling when you select the item in dropdownlist of state combo box
|
|
|
|
|
City_DropDownList.Items.Add(New ListItem(inputtext,value)
|
|
|
|
|
Hi Experts,
I have this:
<asp:DropDownList ID="ddlLocation" runat="server" AppendDataBoundItems="True"
AutoPostBack="True" Width="140px">
<asp:ListItem Value="0">Choose Location</asp:ListItem>
</asp:DropDownList>
Then this sub on codebehind:
Public Sub BindData()
Dim oconn As New SqlConnection(sqlconn)
' AddHandler ddlLocation.SelectedIndexChanged, New EventHandler(AddressOf ddl_SelectedIndexChanged)
oconn.Open()
Dim ocmd As New SqlCommand("select l.locationid,l.Location, c.CourseId, i.instructorId,CourseName, i.instructorname, dbo.fnFormatDate(t.trainingDates, 'MON/DD/YYYY') trainingDates, t.trainingTime,CourseDescription from tblCourses c, tblLocations l, tblTrainingDates t, tblInstructors i, tblCourseInstructor ci where l.locationid = c.locationid and c.dateId = t.dateId and i.instructorid = ci.instructorId and c.courseid=ci.courseid and YEAR(t.trainingDates) = YEAR(getDate()) and l.locationId = " & ddlLocation.SelectedValue, oconn)
Dim oda As New SqlDataAdapter(ocmd)
Dim builder As New SqlCommandBuilder(oda)
Dim ds As New DataSet()
oda.Fill(ds)
gv1.DataSource = ds
gv1.DataBind()
End Sub
We would like to select a value from the ddlLocation dropdownlist and display records associated with that value.
Any ideas how to handle this?
Thanks a lot in advance
modified 21-Sep-14 21:41pm.
|
|
|
|
|
Call Binddata()method from ddlLocation selected Index Change event
it will solve your problem
|
|
|
|
|
Sorry it didn't work.
Oh, I got it working and your suggestion was right.
Thanks for your assistance.
modified 21-Sep-14 21:41pm.
|
|
|
|
|
For each loop to item find
for example
foreach item as listitem in dropdownlist.item
......
...
next
|
|
|
|
|
I think you missed my last post where I said the problem is solved and I thanked you for it.
Thanks again.
|
|
|
|
|
I have a register form to make. But client side validation not working properly. Can anyone help me out.
Thanks in Advance.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Register.aspx.cs" Inherits="Register" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<script language="javascript" type="text/javascript">
function Validate() {
var summary = "";
summary += isValidName();
summary += isValidEmail();
summary += isValidMobile();
if (summary != "") {
return false;
}
else {
return true;
}
}
function isValidName() {
var Name = document.getElementById("TxtName");
if (Name.value == "") {
alert('Please provide a valid Name');
Name.focus;
return false
}
else {
return "";
}
}
function isValidEmail() {
var email = document.getElementById('TxtEmail');
var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if (!filter.test(email.value)) {
alert('Please provide a valid email address');
email.focus;
return false;
}
}
function isValidMobile() {
var Mobile = document.getElementById("TxtMoible");
if (Mobile.value == "") {
alert('Please provide a valid Mobile');
Mobile.focus;
return false
}
else {
return "";
}
}
</script>
</head>
<body>
<%----%>
<form id="form1" runat="server">
<div>
<table style="width:100%;">
<tr>
<td>
Name
</td>
<td>
<input id="TxtName" type="text" /></td>
<td>
</td>
</tr>
<tr>
<td>
Email ID</td>
<td>
<input id="TxtEmail" type="text" /></td>
<td>
</td>
</tr>
<tr>
<td>
Confirm Email ID</td>
<td>
<input id="TxtConfirmEmail" type="text" /></td>
<td>
</td>
</tr>
<tr>
<td>
Password</td>
<td>
<input id="TxtPass" type="text" /></td>
<td>
</td>
</tr>
<tr>
<td>
Confirm Password</td>
<td>
<input id="TxtConfirmPass" type="text" /></td>
<td>
</td>
</tr>
<tr>
<td>
Mobile No.</td>
<td>
<input id="TxtMobile" type="text" /></td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td>
<asp:Button ID="BtnSubmit" runat="server" onClientClick="return Validate();"
onClick="Button1_Click" Text="Register Now" />
</td>
<td>
</td>
</tr>
</table>
</div>
</form>
</form>
</body>
</html>
|
|
|
|
|
In case all values are valid you get 'undefined' in summary, and that because your isValidEmail method has not defined return value in case of valid input!!!
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|