|
no!
because I think it should be sth like 1+1=? problem, but no solution, strange!
no one can give me a real help! I am wondering what is wrong then?
you really have no problem with this? just copy the code into your develper, it works? if so, then which develper are you using?
|
|
|
|
|
Well the problem with you is very simple. There must be some CSS which is applied after you set the style. Just search for global CSS files that applies to each ul / li tags. I think no one could help you if you cant help yourself.
Let me know if you can find one ...
|
|
|
|
|
no, all the code in my file is copied as follows:
could you please tell me whether the text hello1 and hello2 display in red color when you run it? thanks a lot! (for my case, only the bulletestyle is in red color).
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!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">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:BulletedList ID="BulletedList2" runat="server" DisplayMode="LinkButton" ForeColor="Red" >
<asp:ListItem>hello1</asp:ListItem>
<asp:ListItem>hello2</asp:ListItem>
</asp:BulletedList>
</div>
</form>
</body>
</html>
modified on Friday, August 21, 2009 5:24 PM
|
|
|
|
|
Can you show me the output it produces...
Like running this in browser and paste the View -> Source ??
|
|
|
|
|
OK, I copy the sourecode from exploer:
<!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><title>
</title></head>
<body>
<form name="form1" method="post" action="Default.aspx" id="form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJNDg0MDc0MDQwD2QWAgIDD2QWAgIBDxBkZBYAZGRXkafR9WMnzn5x93Mzf8ugRqQYVg==" />
</div>
<div>
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWAwLbj7PnBQKXiqnzBgKIiqnzBq42aNmRvX5f1WHagdWfxQMLFTrr" />
</div>
<div>
<ul id="BulletedList2" style="color:Red;">
<li><a href="javascript:__doPostBack('BulletedList2','0')">hello1</a></li><li><a href="javascript:__doPostBack('BulletedList2','1')">hello2</a></li>
</ul>
</div>
<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['form1'];
if (!theForm) {
theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
//]]>
</script>
</form>
</body>
</html>
|
|
|
|
|
In the head section add
<style type="text/css">
a
{
color: red;
}
a : hover
{
color : blue;
}
</style>
As there is no text direct inside the UL, it will not render that way,
Seraph_summer wrote: <ul id="BulletedList2" style="color:Red;">
This will not apply to <a> tags . You can apply background-color to UL.
|
|
|
|
|
thanks, but my question is that no possibility to change the color of the text of hello1?
|
|
|
|
|
Hello,
I am wondering if there is some functionality with the upper right exit button when it is pushed. I need to do a check to make sure that a button was pushed (save button) before they close the browser. Is this possible? Thanks!
John Michael
|
|
|
|
|
Do this here :
function doUnload()
{
if (window.event.clientX < 0 && window.event.clientY < 0)
{
alert("Window is closing...");
}
}
...
<body onunload="doUnload()">
Just do your code inside the alert.
|
|
|
|
|
This is a real stupid question, but when I open the script, is it technically javascript? So would I write and then write your code? By the way, I'm my website is in C# Thanks! You've been a big help!
|
|
|
|
|
Yes of course... inside <script > tag
|
|
|
|
|
Dear Sir,
I am also one of the registered user in ur website..I am also working on a web project in which i want to embedd a image verification code so that it will make more secure mah website..
So please suggest me how to do this as soon as possible.
|
|
|
|
|
There are dozens of articles here on CP. Just type 'Captcha' into the search box, choose to search for articles and voila
|
|
|
|
|
Hi guys,
I have a small problem, hope u would help me !
I'm tryin to use a custom validator on a Textbox !
Look :
<asp:textbox id="TextBox2" runat="server" visible="True" validationgroup="Test_Custom">
<asp:customvalidator id="first_CV" runat="server" onservervalidate="first_CV_ServerValidate" controltovalidate="TextBox2" errormessage="Complete this field" validationgroup="Test_Custom">*
The code behind now
protected void first_CV_ServerValidate(object source, ServerValidateEventArgs args)
{
if (TextBox2.Text == "")
{
args.IsValid = false;
}
else
{
args.IsValid = true;
}
}
Basically, I hoped to see a message when the Textbox is empty!
But nothin happen when Click on my submit button
Please help me
|
|
|
|
|
You either need to replace the CustomValidator with a RequiredFieldValidator (if you don't need any other custom logic) or set the ValidateEmptyText property of the CustomValidator to true, to force the validator to operate on empty strings. By default, the CustomValidator won't validate if the control is empty.
Adam Maras | Software Developer
Microsoft Certified Professional Developer
|
|
|
|
|
I can't use a RequiredFieldValidator A custom validor is necessary.
By setting the ValidateEmptyText I thing quite good. But In the same Page I have RequiredFieldValidator RegularFieldValidator and ValidationSummary and others controls.
When I click on the submit button I have a messageBox telling me I forgot sum requiredFields or anytthing like dat. But no reference about the field concerned by the Custom Validator in this same MessageBox!
So now I am asking can I show in a messageBox the message error of my CustomValidator ?
thx (sorry for my english, I'm French)
modified on Friday, August 28, 2009 9:45 AM
|
|
|
|
|
Hi,
I am a bit confused with sessions, I have read somewhere that session values get destroyed after the session is expired ; to test that i created two web forms each generating session values on page load, also i capture browser session id by:
session.sessionid();
I am using mozilla firefox as browser
I see that when I click on a button i can see my session values in text boxes i provided
even after the session has expired
also the browser id should have changed too.....
but it remains the same
however when i close the browser with all its tabs
then the browser id changes.........
what should I conclude with the experiment?
1) what is the browser id anyway?
2) when are session values deleted anyway?
3) why did the browser showed my previous session values even after the session was expired?
please help
thanks
Shankbond
|
|
|
|
|
hi all,
can any body tell me that hoe to i convert the html into the pdf file in asp.net or javascript
|
|
|
|
|
Maybe take a look at this component PDFSharp
you would need to parse the html and recreate the text formating and so on using PDFSharp, but that is pretty easy.
There exist other PDF components (both freeware/open source and commercial) so maybe there is other components out there who does the job automaticly.
Edit: Like this one pdfizer
|
|
|
|
|
thanks........actually i have html page where is html table with data and there is an email send button.......i want when user click on send button then this html table send into the .pdf file to email
|
|
|
|
|
Hi Everyone,
I have two web applications, hosted in ISS with different virtual names.
Both applications are having their own databases but users for both applications are same, and both are SqlServer Session mode (session db is same for both).
If user logs into the first application, in the landing page we are giving link to second application along with all other links.
Here I want to use same sessions of first application and need to validate the user in second application and navigate him to his home page of second application, insted of again displaying login screen to the user.
Note: Both are different application hosted with different virtual names.
Hope my question is clear, how can I achieve this concept using SqlServer Session Mode.
Thanks
Hari
|
|
|
|
|
|
Good Day all
In my Application there some error that i dont want my users to see, what i do i send them to myself as an e-mail. that is working. now i want to send the description of the Error to myself. The First thing i do when there is an unhandled exception, i send a user to another page and send an e-mail to myself. i was able to compile a subject and the i want to get the Exception in the Body of my e-mail. How can i get the Error Description of the Page.
First i Made sure the when there is an Error i will redirect the users to a certain page like this
<customErrors mode="On" defaultRedirect="Error.aspx">
<error statusCode="403" redirect="Error.aspx"/>
<error statusCode="404" redirect="Error.aspx"/>
</customErrors>
now in the page load if the page i have this
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
Send_log();
}
}
and my method is defined as
private void Send_log()
{
String Client_URL = GetCurrentPageName();
Exception objErr = Server.GetLastError();
MailMessage mm = new MailMessage();
SmtpClient smtp = new SmtpClient();
mm.From = new MailAddress("vuyiswamb@gmail.com");
mm.To.Add(new MailAddress("Vuyiswa@its.co.za"));
mm.Subject = "Exception Report from " + Client_URL + "In EXAM/CLASS";
mm.Body = objErr.ToString();
mm.IsBodyHtml = true;
smtp.Host = "smtp.gmail.com";
smtp.EnableSsl = true;
System.Net.NetworkCredential NetworkCred = new System.Net.NetworkCredential();
NetworkCred.UserName = "vuyiswamb@gmail.com";
NetworkCred.Password = "wow";
smtp.UseDefaultCredentials = true;
smtp.Credentials = NetworkCred;
smtp.Port = 587;
smtp.Send(mm);
}
Now the Problem is in this object
Exception objErr = Server.GetLastError();
it always brings back nulls. now.Now am testing this Methiod with a page not Found Error , something like this
Response.Redirect("MissingPage.aspx");
Thanks
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Add Global.asax to you project and add "sending of the mail" code inside Application_Error method and use Server.GetLastError().GetBaseException() to catch the exception.
|
|
|
|
|
Respected Sir
I am using visualstudio2008 i want to allows the textbox with leeters and charecters but not special charecters i want to restrict the textbox not allowing special charecters i am using 4 validations controls By Using Validation controls how i can achive
Laxman
|
|
|
|