|
vijisuren wrote: Actually i want the syntax to create class in ASP.Net
You should buy Some Basic .NET Book and start reading.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Read the guide on how to ask intelligent questions before posting here again, and don't post until you've bought a book and worked through it.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi,
When i want to connect to Oracle through asp.net i am getting this error
"System.Data.OracleClient requires Oracle client software version 8.1.7 or greater"
Please help me.
|
|
|
|
|
Hi friends,
When user close the browser close button,the popup window would be opened.In that pop up page contains some text boxes which can be filled by user.After clicking submit or Okay button in that popup window only both windows will close.I can try this by using page onbeforeunload event and onunload events.But it not works fine.How to fix this issue?Plz help me..
Thanks in Advance
Regards,
Venkat
|
|
|
|
|
You can try this following,
function ShowPopup()
{
if(window.event.clientX < 0 && window.event.clientY <0)
{
window.open("Operation.aspx", "Operation",'left=100,top=100,width=300,height=200');
}</code>
}
Call it on Body Unload
Hope this will help you
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Thanks for ur response sir.
But if i click tht page browser close button 1st popup window will be shown.When i click pop up window's okay or submit or close button,then 1ly both pages will close.How can i do this?
|
|
|
|
|
I want to change the text color of the buttetedlist items, as follows, however, it does not change to red,
what is wrong? by the way,if DisplayMode="text", then the color is red, does this mean for linkbutton mode,
the forecolor does not have effect? but how to change the color then? it always show as shaow blue in the explorer,
no idea why. any one can give me help?
or some bugs exist in visual web develper?
<asp:BulletedList ID="BulletedList2" runat="server" DisplayMode="LinkButton" ForeColor="Red">
<asp:ListItem>hello1</asp:ListItem>
<asp:ListItem>hello2</asp:ListItem>
</asp:BulletedList>
|
|
|
|
|
Hey ... Same thing posting again and again.
Didnt it solved yet?
|
|
|
|
|
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
|
|
|
|