|
Hi, just a little clarrification required please!
I am in the process of developing several ASP.NET User Controls and a class library to plug into a third party CMS. What I have done with regards to the connection string and the fact that my class library cannot see the web.config file (and this may not be the best approach in which case I'm all ears!) is to have a shared class variable, called ConnectionString, which has a value assigned to it by my User Controls on each load of the User Control.
But what I have found is that if I set the ConnectionString variable once, it seems to be available even after post back without having to set it again. What's more, even if I close the browser and load the page again, the shared connection string variable still seems to be there.
Could someone please shed a little light on the scope of shared variables in this context and whether it's a good or bad idea to use them.
Thanks
|
|
|
|
|
shared (static in C#) has got a lifetime until the application domain unloads. Every .NET process will have an application domain associated with it and ASP.NET process will also have one. So your shared variables will end when ASP.NET service ends.
shared variables are OK in your case (just for keeping the connection string).
|
|
|
|
|
OK great, thanks for the clarification
|
|
|
|
|
Liqz wrote: Could someone please shed a little light on the scope of shared variables in this context and whether it's a good or bad idea to use them.
This seems to be asked often lately. The scope of a static/shared variable in ASP.NET is the same as in their languages in general.
I would not use them for anything.
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.
|
|
|
|
|
Christian Graus wrote: I would not use them for anything.
OK thanks, I appreciate the advice. The only other way I can think of to make the connection string available to my class library is to pass it into the constructor when instantiating objects. Is this the method you would use or do you have any other suggestions?
|
|
|
|
|
i want to show a panel of yahoo news in my website
One person's data is another person's program.
--J.Walia
|
|
|
|
|
Yahoo provides the news feed in RSS format.
There are many article in CP on how to read RSS feeds.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
J walia wrote: i want to show a panel of yahoo news in my website
below is the RSS Feed link. You need to read this using code
http://news.yahoo.com/rss[^]
|
|
|
|
|
Do you want to show a piece of news? Then why not copy and paste?
If you want to show the page of yahoo news, you can use iframe and set the yahoo news page as its src.
April
Comm100 - Leading Live Chat Software Provider
modified 27-May-14 21:57pm.
|
|
|
|
|
Hello,
I am writing web application in ASP.net 2005
I need to create a dynamic graph that contains lines. The user will be able to click on a line and get some info.
I did this program in VB.NET 2005, I draw all the lines on a picturebox and I got the info of the line under PictureBox click event.
In ASP.NET there is no PictureBox. What is the way that I should use to start the application. (I know that I can draw the lines by using Bitmap object but how can I get the click event?)
Thank you for your help
Shay Noy
|
|
|
|
|
shaynoy wrote: In ASP.NET there is no PictureBox. What is the way that I should use to start the application
First, you need to accept the difference between Windows and Web applications.
You can not implement in the same way as you did earlier.
In ASP.Net, you will do this at server side and then stream it to the client.
Btw, why dont you use some chart control?
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Thank you for reply.
Do you know which control I can use for this?
All Chart controls examples I saw on the web cost money. Perhaps there is a way to draw the lines(this is OK) and to click on them and raise event.
Shay Noy
modified on Tuesday, October 13, 2009 8:51 AM
|
|
|
|
|
|
He is using VS 2005 i.e. framework 2.0.
This charting control requires framework 3.5 SP1
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Sorry I didnt Check That .
Then he Have to go for third party Controls..!
|
|
|
|
|
I need something free, all those examples cost money.
Thank you
Shay Noy
|
|
|
|
|
shaynoy wrote: I need something free, all those examples cost money.
As one suggested for .NET Control, you go with that. You can also look with Fusion chart.I guess which having few chart control as free. You can use them also.
|
|
|
|
|
Wat About the features..! My Friend..!
|
|
|
|
|
Then You Have to upgrade to Asp.net 3.5 and then You Have asp.net chart control in asp.net3.5.You Have More Features...!
|
|
|
|
|
Why do you need something free ? Is this just a fun project ? If it's a paid project, then surely you should present options for good quality, not just 'the best that is free' ?
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 friends,
i want to do Microsoft certification in web development track.
for this i visited Microsoft site. but i haven't found the paper list
in a sequence.
so can any one tell me that which paper i have to do first?
MCP or MCTS or other
thanks
|
|
|
|
|
Ravindra Bisen wrote: so can any one tell me that which paper i have to do first?
MCP or MCTS or other
MCP or MCTS are not the exams but the credentials(certificate) given to you after you pass an exam or a set of exams.
As soon as you clear the first MS exam, MS gives you the MCP credentials.
For more details, look here[^]...
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
hey guys , just passed final exam of mcse 2003 and Iam now MCSE 2003 Certified . went through months of studies , used certarea.com exams , MOC books . certarea.com questions were right on money . Even though they do not provide real exam questions , their questions are harder then real exams , so it makes it easy to understand concepts . now am looking forward to moving to cisco track
|
|
|
|
|
If you can't find the information then you are certainly not qualified to become certified in anything
only two letters away from being an asset
|
|
|
|
|
Ravindra Bisen wrote: but i haven't found the paper list
in a sequence.
Have a look
Microsoft Certified Technology Specialist (MCTS)[^]
If you are looking for MCTS- Web Development, Just look at MCTS: .NET Framework 2.0 Web Applications . You need to give to paper. Details are there. Let me know if you need any more help !
Thanks !
|
|
|
|