|
Hi to all,
How can I display when textbox losting the focus with asp.net validation controls?
I am having a ten textboxes(mandatory). I am using requirefield validator. This is working fine when I click the submit button.
I want to display the errormessage when the focus leaving from control(if textbox is empty).
Regards,
|
|
|
|
|
You just need to change the display property of the required field validator control to dynamic.
Best Regards,
Apurva Kaushal
|
|
|
|
|
I already worked on that. But the result is nothing. By using this, validation should be fired. but it can't?
Can I change any changes to webuivalidation.js?
I am using asp.net1.1. and iis5.1
Regards,
|
|
|
|
|
P Bhasker wrote: I am using asp.net1.1. and iis5.1
me too! but there is no problem.
you just need to change the property or writing so that you can see what you want.
do this and run your program.when u leave the textbox blank,u will see what you want
|
|
|
|
|
i am new to asp.net now i want to know how to use the application state an session state
|
|
|
|
|
There are so many articles available on net about the same. one os them is this[^]
Best Regards,
Apurva Kaushal
|
|
|
|
|
I am new ,also, to both ASP and ASP.net and in both instances I am self taught. Nonetheless, let me try to explain what is and the usage of both session and application state. Application state refers to any data that you might want to share amongst (all)users while session state maintains the state for individual user. While values stored in the application state will remain until the application is restarted or deleted, session state values are removed and discared as soon as the user ends his/her session(either by logging off or closing the browser). A typical example of session state is a counter on a website which tells you "you are the Xth person visitng our site (whereby X respresent the number of visitors to the site since the application started). While session state will tell you "You're logged in as such "username" and have been on for the past X amount of minutes (per se).
To set/capture and access the values contained in specific state the following syntax can be used.
Session state (syntax)
Session["MySessionVar"] = "MyValue";
/*where by my value can be anything u want to use be it username, password(not advisable), userPreferences....and so on. */
//then you can assign it to a variable which you can use to access and print the value of Session value(s)
SessionAlias = Session["MySessionVar"];
//To output the value contained in your session can be
//written as (lets say used the login name as the session
//value).
Response.Write("You are currently logged-in as " + SessionAlias);
The application state (syntax) is quite same as the session syntax. The only difference is that instead of using keyword "Session" you use "Application".
I must admit that this is a very elementary explantion but I sincerely hope that it helps you to better understand the concept. Not to long ago I was exactly where you are now in learning ASP and ASP.net and though I have advanced somewhat, I still have a long way to go. The best way to learn these concepts and ideologies are to practice writing them. However if you are unfamiliar with their existence then there will be no inclination to learn them. As a novice programmer I've found out the best way to learn is to read as much source code as you can and anything that captures your attention you should write it down then find a season programmer and start questioning him away. Hopem this helps.
PS: I will stand corrected should any of the readers find my explanation is erroneous.
-- modified at 15:38 Thursday 11th January, 2007
Skan
Coding makes the world go round!!!
|
|
|
|
|
I have a database full of dates and events for a calendar. I can (and have, using ASP) created my own code to create and fill out a Calendar. Before I review my code and rewrite it using ASP.NET/VB.NET I want to make sure I can't use the Calendar control already provided. I need to have two views for this, the first looks like the basic calendar control but with a color code for repeating dates. Like say the Jan. 12th is Martin Luther King Jr. Day, I would like it's background yellow (basically have style="background-color:yellow" in the TD tag). The second need I have is to have a big calendar with actual text in the box, so on the 12th the text "Martin Luther King Jr. Day" would be in the box with the date. So the basic question is: Is there anyway to programmatically access the individual date cells?
|
|
|
|
|
RX Maverick wrote: Is there anyway to programmatically access the individual date cells?
There is. The ASP.NET Calendar control exposes an event called OnDayRender in which you can manipulate the look of individual day cells or add content based on the day. Here's a CP article[^] that uses OnDayRender. The article goes into some complexity - you might want to look up OnDayRender in MSDN too and look at the examples there.
|
|
|
|
|
That's a great article with a lot of good information but now I have a second problem. I would like to use this with AJAX but in doing so I can't have it in a form element. I understand it wants the for element to handle the postbacks and such but I don't need that all I need is regular links. So can I tell the calendar to not use postback/forms or should I just make my own system?
|
|
|
|
|
RX Maverick wrote: I would like to use this with AJAX but in doing so I can't have it in a form element
Really? I thought that could be done. You have the calendar in an UpdatePanel, which would be in a <form> element, right?
|
|
|
|
|
Hello,
I am trying to create a simple webpage which displays a image from a record in my mysql (v4) db. Im using asp.net c#.
I found the article on this site name "Storing Images in MySQL using ASP.NET" however I am really having trouble getting the example to compile.
Does anyone out there know of any other good examples or tutorials I can follow? Has anyone done this before that could give me some guidance?
Thanks for your time.
|
|
|
|
|
Hello tmoney101,
its very simple. Define a HttpHandler for drawing images, define it in your web.config file in httphandler section <httphandlers>... Read the image from your DB, give the right ContentType and send the image data with Response.BinaryWrite().
|
|
|
|
|
Hey thanks heaps for your reply. I have started to read up on those techniques you have given me, however I am unsure if that link you gave me points to a reference webpage? When i follow the link it takes me a safe2web page that has no coding!
Thanks again.
tmoney101
|
|
|
|
|
Sorry, that was only a signatur.
Here you can find samples about implementing simple IHttpHandler:
http://www.codeproject.com/aspnet/domainforward.asp
http://www.15seconds.com/issue/020417.htm
|
|
|
|
|
Hi!
I would like to thank Mike Elliott for his nice example and program for IE Tree View Web Control for ASP.NET 1.1 and Client Scripts Overriding to stop posting back.
It's great.
But, I got stuck to the following enhancements:-
1. How can I implement Expand All and Collapse All features to the tree?
2. Finding the node data that matches the user input into a text box and based on the matches found the hierarchy to these node should be expanded.
3. How to stop Mozilla or Safari browsers to posting back the page?
Thanks
Tonmoy Roy
|
|
|
|
|
Where is the article from Mike Elliot which explains IE tree View. I have been looking for an article of this nature for quite some time since I wanted to create a webpage which displays databases record (by topic) in a tree view. I had post a question asking how to do this but unfortunately did nto get a response. It would be greatly apprecaited if you can point me to Mike's article.
Skan
Coding makes the world go round!!!
|
|
|
|
|
|
HI
Guys can any one please let me know the considerations to be kept in mind while making data acces layer for ASP.NET Web application, reply me ASP,
Thankx in advance for ur replies.
|
|
|
|
|
King Shez wrote: reply me ASP
That's a sure way to have your message ignored.
Your question is a very broad one. Can you narrow it down a bit? What specifically are you having problems with?
|
|
|
|
|
Hello I need edit one field in gridview but I do not wish to use the standar button of update, I need that the field can be edit same that a checkbox and I need that when the user change of row this change update automatic without botton of update.
Thanks very much
|
|
|
|
|
Please don't cross post. We have asked you before.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Please don't cross post. We have asked you before.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Sorry my english is very poor, I don´t understand. Can you repit this with other words?
thanks and sorry.
|
|
|
|
|
Hi,
I try to create a CompositeDataBoundControl based custom control like this MSDN example.
On first call this page is correctly loaded, CompositeDataBoundControl too.
But on postback the CompositeDataBoundControl is empty.
How can I use automatic ViewState saving and loading for restoring inner table state on postback ?
Loutre Maline
|
|
|
|