|
Performance is not the reason to call Dispose . It avoids resource leaks. When you dispose your connection properly, ADO.NET's connection pooling can work efficiently. Here is a decent article on the subject : Implementing IDisposable and the Dispose Pattern Properly[^]
Best wishes,
Navaneeth
|
|
|
|
|
Your statement "monthCalendar1.AnnuallyBoldedDates = new DateTime[] { ReservDays };" recreates the array on each iteration.
And also, the statement "DateTime ReservDays = (DateTime)rd["Reserve_Date"];" is needless.
I also recommend using a try/finally, with the rd.Close() in the finally. And a using statement for the connection.
|
|
|
|
|
how do i call a c# funcation in html code, on link's onclick?
i have already called a function onclick, i need to call another function.
kindly help me out....
Thanks
Saurabh
|
|
|
|
|
Assuming I understand your question you just need to name the second function as something else, e.g. OnClickTwo() .
btw please do not use bold font for your question.
|
|
|
|
|
Firstly, try such questions in the ASP.NET forum - you are more likely to get usefull replies.
I assume you are trying to call a C# function in the code behind (server code)? In which case just make the link runat="server" and the onclick event should pick up C# code.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
As someone else said, we have an ASP.NET forum. I hate to say this, because it's a library overused by all sorts of clueless people, but AJAX may be what you're looking for. The alternative is simply to have a server control call a code behind method and do a postback.,
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.
|
|
|
|
|
thanks everyone..........for ur support.
|
|
|
|
|
saurabh8april wrote: funcation
Excuse me, but BWAAAA-HA-HA-HA-HA! My sides hurt! You guys slay me!
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
gud afternoon
i have a problem
i have a taextbox and i want to enter in it only 2 digits or 11 digits
example
12 valid
123 invalid
12345678912 valid
123456789123 invalid
plz. rply its urgrnt
|
|
|
|
|
You don't need Regex(Regular Expression)
Use can use Leave event :
private void textBox1_Leave(object sender, EventArgs e)
{
if (textBox1.Text.Length != 2 && textBox1.Text.Length != 11)
throw new Exception("invalid");
}
modified on Saturday, November 7, 2009 10:03 AM
|
|
|
|
|
I think you want an && , not an || .
|
|
|
|
|
Yeah, You're right. Thanks
|
|
|
|
|
hai......
help me plz...i done this prob ..but that count nums displaying in same in file path....i want to dispaly in saparate path ....
i took paths lik..|sno|filename|count|...........n i take multiple files which is displaying in sno....but char count was nt dispalying in count path.......its displaying in filename path...
plz help me how can i get that count in next path....?
thanquuu.
|
|
|
|
|
What on earth does this mean?
Try to clarify your problem and spell words in full, please do not use 'txtspk' it makes you question look like gibberish.
|
|
|
|
|
Hiii all..........
I need helping if you don't mined that >>> i think you don't mined ............
How i can use "winpcap" or "sharpcap" to capture and redirect all incoming packets using C#.net windows application ???????????
|
|
|
|
|
Have you tried Pcap.Net?
http://pcapdotnet.codeplex.com
|
|
|
|
|
Hi
How are you
I have a questio
How i can load image on Asp.net with c#?
|
|
|
|
|
We have an ASP.NET forum, and the answer has nothing to do with C#, as it happens. You just put an image tag on your page and point it to the URL of the file on your server.
If you meant something more complex, please ask more clearly in the correct forum.
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.
|
|
|
|
|
what is the procedure for connecting sql server databsae in c# ,
i want display data in textbox,i also display max value in row in the textbox
modified on Saturday, November 7, 2009 1:52 AM
|
|
|
|
|
What do you mean by page, is this an ASP.NET question ? What have you tried ? Is this for a class, or for your paid job ?
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.
|
|
|
|
|
Can i use tab button in date time picker? Purpose is- while entering date in form Date time picker is used. First I enter DD than to enter MM i'm supposed to use arrow key to move to MM. For that i want to use tab key.
How to use?
|
|
|
|
|
If the control does not support it ( which seems odd ), then you'd have to either figure out how to hack the control to have a tab order, or write your own.
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
i want to change the date formate like this
dd/mm/yy
is it possible
|
|
|
|
|
Why would you ask a question from someone else who doesn't know how to use the control ? A DateTime does NOT have a format, it's up to you to format 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
i want to read data from excel file
suppose in sheet1 in the cell A1 the value is "vijay"
then i want to get that value
i found some articles they are using dataadapters etc
i need to read only few cells which are located at differnt locations
|
|
|
|