|
But Why you want to show them one by one ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
because...if first textbox is empty, then it shows only Firsttextbox is empty, if it is filled, then it has to show second textbx is empty, not all other textboxes messages...
This is my requirement. i have to go for normal javascript, it is ok
But i have to use this validtaion controls..i.e the problem for me.
can u suggest this, how to approach for this requirement
G. Satish
|
|
|
|
|
Yes there are many approach for this..
Do you want to fire all validations at client side ? (you can do it with javascript)
or is it ok with server side ? then make each validator EnableClientScript to false and at the server side just check each Validator is IsValid or not one by one if first one is Invalid make all other valid
if it is Valid then check for next Validator
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Set ur Validator's Display Property to "Dynamic"
This can work the way u want.
Believe Yourself™ :->™
|
|
|
|
|
Friends...
I know well how can we use ajax with 2.0 no idea about asp.net 1.1.
Actually my project is in asp.net 1.1.I am in deep trouble.
Please let me know if you have an idea about that.
Thanks in advance.....
adil kazmi
|
|
|
|
|
You can use AJAX anywhere you want. It's just a bunch of javascript. If, on the other hand, you don't know how to write AJAX code and are reliant on the ASP.NET AJAX library ( which basically wraps AJAX for you and provides you with a bunch of controls that write the code for you ), then you're right, you're in trouble.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hi
there is nothing to worry abt it
It is as simple as writing a JSCRIPTS in a Saprate file.
It is a one kinda Control library that will going to attached via link tag in html page.
Believe Yourself™ :->™
|
|
|
|
|
Hi fellas, I'm stuck big time with my site. I'll try to make it short and simple.
I am currently trying to write a website in the C# of ASP.NET. I am writing it in VS.NET 2003.
I needed to use CSS for flexibility, so I decided to store the values of the CSS in a SQL Server Express 2005 Database.
I also use a lot of user controls, I used a user control for my tabs on the site, another for the list buttons.
However since there are quite a few pages in the site, I decided to use the external style sheets, since updating them would make my life easier.
After the CSS values is retrieved, the values are stored in a session variable, then the style sheet links with the CSS session variables.
I have placed the database connection in the very first line of the Page_load of the index.aspx.
The problem is, it seems the CSS values are never loaded.
Here's what I've tried and done:
1. Using internal style sheet (by placing it in the HEAD header) seems fine, the CSS worked.
2. I am certain the database connection is fine; I made a dummy label on the index.aspx, and I was managed to print the value from the database onto the Label.
Therefore I am suspecting the culprit is the user Controls are loaded first, then the database. Therefore the CSS could never retreive the CSS values from the database.
Could there be anything else? I am stuck big time. HELP!!!
|
|
|
|
|
I don't see the point in storing your CSS in your database. There probably isn't one. Either way, I would say the first step is to remove them from the DB, so you can establish if the DB is the point of failure. Load them from a local path, then if that works, look at your DB code.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I guess I forgot to mention the reason I am storing it in the database it because I want the user to be able to set different color schemes for the site.
|
|
|
|
|
i think might be you are doing in wrong place try to do it page init/pri int events then see ...
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Thanks for the replies.
I am quite certain the Database itself is fine. I experimented by placing the database connection codes right under the Page_Load section of index.aspx.
Then I created a dummy label on the index.aspx, and have it print out one of the values retreived from the database onto the label. Worked fine.
Is there anywhere else I can store the database connection codes? I thought placing it under the Page_Load is pretty much the best bet. I just can't think of anywhere else.
I do need to know does VS loads the user controls first, then it loads the Page_Load of the index.aspx.
|
|
|
|
|
User Control Won't be going to help anymore.
And Yes First U.C will be loaded and then Page.
Put a Break point on U.C's Page Load. U will get it.
Believe Yourself™ :->™
|
|
|
|
|
OK, either way, I'd be removing the database stuff, it just makes sense to work out if the DB is the source of hte problem or not, even if it's just a starting point to fixing it with the DB. I presume you've checked that the CSS is in the final HTML.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks for the reply.
I am certain the DB is fine.
I am stuck with the following:
My index.aspx is basically filled with user controls. Some of the CSS settings also applies to the user controls. Therefore I have external Style sheet links within the user control files too.
My question is when the index.aspx is loaded, does it first load the user control files that are linked with the index.aspx, then it loads the Page_Load of the index.aspx, where the database codes are stored.
This is the only reasonable explanation I can come up with, since when the User Controls are loaded the DB connection codes aren't executed yet.
Any ideas? Double thanks! This is driving me nuts....
|
|
|
|
|
Infernojericho wrote: My question is when the index.aspx is loaded, does it first load the user control files that are linked with the index.aspx, then it loads the Page_Load of the index.aspx, where the database codes are stored.
In Page Life Cycle Page Initialization is fired from child control to parent control means User control will get initilazed first then Page
but Page load will always fire from Parent control to child means
Page Load will occur first then user control load will occur
do one thing just try to debug your application and check are you able to set style sheet in page load ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Thanks for the reply.
This is the entire content of the CSS style sheet. The code worked when it was an internal style sheet (inside the . I simply copied and pasted it to a new file, styles.css. Or am I missing something here?
<br />
<style type="text/css"><br />
<!--<br />
<br />
#navlist<br />
{<br />
padding: 3px 0;<br />
margin-left: 0;<br />
border-bottom: 1px solid <%=Session["common_borderlinecolor"]%>; <br />
font: <%=Session["tab_fontstyle"] + " " + Session["tab_fontsize"] + "px " + Session["common_fontname"]%>, sans-serif; <br />
}<br />
<br />
#navlist li<br />
{<br />
list-style: none;<br />
margin: 0;<br />
display: inline;<br />
}<br />
<br />
#navlist li a<br />
{<br />
padding: 3px 0.5em;<br />
margin-left: 3px;<br />
border: 1px solid <%=Session["tab_borderlinecolor"]%>; <br />
border-bottom: none;<br />
background: <%=Session["tab_mouseawaybgcolor"]%>; <br />
text-decoration: none;<br />
}<br />
<br />
#navlist li a:link<br />
{ <br />
color: <%=Session["tab_unvisitedfontcolor"]%>;<br />
}<br />
<br />
<br />
#navlist li a:visited<br />
{<br />
color: <%=Session["tab_visitedfontcolor"]%>;<br />
}<br />
<br />
#navlist li a:hover<br />
{<br />
color: <%=Session["tab_mouseoverfontcolor"]%>; <br />
background: <%=Session["tab_mouseoverbgcolor"]%>; <br />
border-color: <%=Session["tab_mouseoverbordercolor"]%>; <br />
}<br />
<br />
#navlist li a#current<br />
{<br />
background: <%=Session["tab_currentbgcolor"]%>;<br />
border-bottom: 1px solid white;<br />
}<br />
<br />
--> <br />
</style><br />
|
|
|
|
|
My Friend you are adding Style sheet dynamically.
i think you should do that before page gets load i think Page Pre init is good event to do this.
Just try to put your code there it shouild work i think there ia no problem in your CSS
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Thanks for the reply.
Here's the problem. The database connection codes are at the page load section. What the DB codes does is it connects to the db, retreives the CSS values, then stores the CSS values in a session variable.
However if the CSS style sheet goes before the db connection then the CSS style sheet won't receive any values???!!!
Thanks
|
|
|
|
|
U can use css in Your VS2003,
It will save all this session problems that curruntly u have so it will be better to Include Css in Project itself.
And yes what u say
"external style sheets, since updating them would make my life easier"
While running the project u don't need to restart it again if u make changes in css.
So it is not the case while codding in Code behind file.
Believe Yourself™ :->™
|
|
|
|
|
Hi,
What is the difference between the Security Application Block and the ASP.NET Membership Provider? I normally use the ASP.NET Membership Provider to handle my logins, but where and how does the Security Application Block fit in?
I hope some can advise?
Thanks
Brendan
|
|
|
|
|
I have an HTML table rendered by a Repeater control on a UserList page. It displays a list of Users, and to the right of each user, a delete and an edit image button. I have JavaScript that executes on the page load, that binds event handlers to the onblur event of each cell in each table row. The event handler posts an Ajax request to the server, so any updates the user makes are almost instantly persisted to the DB.
Only selected, frequently used, User fields are displayed in the table for the 'in-place' editing described above. To edit other fields, the user clicks the Edit button at the right of a User row, and another, UserDetails page opens in a pop-up, which the user closes by clicking Cancel or Save after any editing of the User details.
I now need to modify the UserList page so that when the user clicks the Edit icon, a User Details edit area becomes visible still on the UserList page, i.e. an invisible/collapsed area for user details expands/becomes visible when Edit is clicked, then collapses/becomes invisible again when Save or Cancel is clicked.
How could I best achieve this?
|
|
|
|
|
I think u need a table Which is has a Button or kinda Icon.. While Clicking on that Icon Ur that Html Table should Be Close and Again Clicking on that Icon It should again Expand?
Is it something that u want or anything else?
Believe Yourself™ :->™
|
|
|
|
|
Yes, that is what I described as needed, but I'm asking how best to do it.
|
|
|
|
|
Hi
This can be achieved with the help of some CSS and ofcourse A Javascript.
U can Take Two Tables.
For Instance One for Storing An Icon[Image] and it will hold the Title for ur table, On which you are going to click[This table has hight approximatly 22px and we can use a div tag for firing a javascrip here and an Image which] and Second table which is going to lied Exactly beneath the Upper table,
And this table is made for Expand/Collapsible and all the controls and other things are going to put in this table.
i think this will be better...
any doubt.....
Believe Yourself™ :->™
|
|
|
|