|
I was a windows application programmer. I am newbie in web.
What i did in windows application is that the database connection will implemented at the time of start up the program. But when i started the work on web application i got an advice to open and close the database connection for every database operation. As an explanation they said it is the safest method.
But what is the risk? I searched some time in Google i couldn't find a good answer. Can i store sqlconnection object in application variables? Or is there any other good method? Can i get any useful links for this?
Thanks and regards
Ken,Mexico(Guanajuato)
|
|
|
|
|
you are using asp.net(c# or vb) coding language ,Whatever may be if you are asp.net the you can use webconfig file to declare connection and you can use the single connection where ever you want in your project.
ganeshk
|
|
|
|
|
Yes i am following this method. I wrote the connection string in web.config file. But what is my problem that opening database connection each time makes my site slow. I noticed that some of the functions are slow because it take 1 or 2 seconds to open a connection.
Thanks and regards
Ken,Mexico(Guanajuato)
|
|
|
|
|
That doesn't sound right. You should be enjoying connection pooling[^] as automatically provided by ADO.NET.
|
|
|
|
|
Thanks for that link. Actually i was blind on this problem. Now i got a thread. Let me to read that article for creating a systematic database connection.
Thanks and regards
Ken,Mexico(Guanajuato)
|
|
|
|
|
Hi Friends,
The following question was asked me in my interview. Since i am new to .net technology,
Please help me to know the answer for this question.
How Session Management is handled by ASP.NET?
Thanks in Advance,
Regards,
Prya
|
|
|
|
|
session object contains the user information. it will be created in the server side and it has some methods and properties.
you can set the session values programmatically and you can delete the session through the session.abandon method.
every session has individual unique id to identify the session.
All The Best
Sathesh Pandian
|
|
|
|
|
Hello Everyone,
Can anybody let me know how to create the message editor box of codeproject
For Example:- Actually i've to create the custom tags like bold,italic and etc so that i must be able to change the content of my site dynamically
I've textbox or label in this i just want to bold the text(particular) at runtime
Plz suggest me some way to come out of this problem
Thnx in advance
|
|
|
|
|
The site uses a HTML editor control, you'd need to write one, or find one online. I have no idea what control we use.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
In the internet many html editors are avaliable with source code.and one of them is FCKEditor.so u can search into this keywords.
Deepak
Smile a Lots,Its Costs Nothing
|
|
|
|
|
Maybe look into this
htmlarea[^]
He who laughs last is a bit on the slow side
|
|
|
|
|
NeroToxic wrote: He who laughs last is a bit on the slow side
A nice variation on this:
No matter how long he who laughs last laughs, he who laughs first has a head start!
|
|
|
|
|
I like
No matter how long he who laughs last laughs, he who laughs first has a head start!
|
|
|
|
|
Hi
I have made calender control in javascript & called in asp.net 2.0.
I want in textbox also tht calender sholud be called & & 2 months Date it should show & Which date & privious date must be disabled .
Plz Help
thnx
|
|
|
|
|
Well, seeing as you wrote your own control, and have not posted code, I really don't see how we can help with this. If you want to disable a control, look it up and set it's disabled property ( from memory, it's disabled, not enabled ). But, I'm surprised you don't know this, if you've written a calendar control in javascript ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
I have added html file in asp.net project. In which I have to write code for saving the image files.
Image file path in same page on textarea. I want to save that image to server.
thanks!
-- modified at 2:57 Tuesday 24th July, 2007
|
|
|
|
|
Save what image files, and where ? Coming from your server to the client ? You'll need more than HTML to do that.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
I have added html file in asp.net project. In which I have to write code for saving the image files.
Image file path in same page on textarea. I want to save that image to server.
thanks!
|
|
|
|
|
Oh, OK. So, you need to replace your html file with an asp.net page, which uses a file upload control.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
which i understand ur problem, u want to save ur posted file into web server. if i m right then use the following steps.
1. create a html control into ur form by following code
<input id="FileUpLoad" type="file" runat="server" />
2.write the following code into ur save button click
string mapPath = (Server.MapPath("~/abc/xyz\\"));
FileUpLoadMap.PostedFile.SaveAs(mapPath);
3.give the write permission into ur particular folder where u want to save ur post file in ur web server.
hope tht'll help u
Deepak
Smile a Lots,Its Costs Nothing
|
|
|
|
|
Hi,
I have put the animation control in html form. It is worked upto IE6 fine but it is not working in IE7.
My animation control code is....
<object id="IAnimation"
classid="clsid:B09DE715-87C1-11D1-8BE3-0000F8754DA1" style="width: 8.44em; height: 9.88em">
<param name="OleDropMode" value="1" />
Link for reference example-----------http://www.codingforums.com/showthread.php?t=36896
Can any one give me solution for this ?
Thanks!
|
|
|
|
|
hi,
I am working in asp.net 2.0 with vb script. I have few projects which were working fine. But suddent from last few days all are giving the error that is related to date function. Date is not getting stored in database. It gives the error that string cant be converted to date. But it was working fine. and also when i select data from database to bind in a datatagrid then also it is giving the same error. What might be the reason? The datatype in database is DateTime.
The syntax i am using is
text1.text=calendar1.selecteddate
insert table1(ddate) values ('" & text1.text.trim & "')
Chaitra N
|
|
|
|
|
You never use vbscript with ASP.NET. Well, if you are, you're using it on the client, and you shouldn't, because it ties you to IE.
What is the string that it can't convert ? Have you checked in the debugger ? Have your locale settings changed ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
The project had been developed with VBScript. it says
string "" cannot be converted to type date
and in some areas
char cannot be converted to type date
I have not changed anything with my local system
Chaitra N
|
|
|
|
|
So, it is ASP.NET, but uses VBSCript on the client side ? you know you can change to javascript on a page by page basis, right ? VBScript will only run in IE.
If you have an empty string, it plainly cannot be converted to a date, you need to fix your code so the string is not empty.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|