|
We have a webservice to send sms.We need to load the modem configuration during the initial startup of the webservice in the IIS.We need something similar to form load event in windows application.But in this case we have to load the configuration during the first time startup of the webservice in IIS.
Thanks in advance....
|
|
|
|
|
How about Application_Start in global.asax?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
|
relevent to my previouse question.is there any differnce when passing values to sql 2000 and to sql 2005 using parameters and in c# 2005 , if so what is it ?
|
|
|
|
|
prasadbuddhika wrote: relevent to my previouse question.
We don't know what that was....
prasadbuddhika wrote: .is there any differnce when passing values to sql 2000 and to sql 2005 using parameters and in c# 2005 , if so what is it ?
Why would there be ? In what sense do you mean ?
The most likely answer is no. They wouldn't sell many copies of SS 2005 if it means people have to rewrite their code and their SQL to use it.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi,
why this repost? musefan[^] already told you SQL2000 uses question marks, not names, and hence needs the parameters in the right order.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Sunday, June 12, 2011 8:06 AM
|
|
|
|
|
Does anybody come across the requirement of compressing clickonce deployment files. My project is of size 80 MB which i want to compress and use clickonce to compress it copy it to client uncompress and install. (clickonce supports Http compress, which i don't want to use.)
any ideas?
Thanks.
|
|
|
|
|
Member 2324483 wrote: any ideas?
Yes, build a smaller app, or break the app into modules that can be downloaded when necessary.
only two letters away from being an asset
|
|
|
|
|
I have a C# application creating a pdf document. The pdf document might be open, or during creation caused an exception and other things can happen. I know I can catch FileNotFound, DirectoryNotFound and general IOException exceptions. However, if the file is open I want to be able to tell the user to close it or if my code caused exception halfway during the creation I want to be able to release the lock on it.
How can I find out what specifically happened? Is the file open? Did the creation failed halfway?
CodingYoshi
Visual Basic is for basic people, C# is for sharp people. Farid Tarin '07
|
|
|
|
|
following classes are derived from IOException:
DirectoryNotFoundException
EndOfStreamException
FileNotFoundException
FileLoadException
PathTooLongException
Calin
|
|
|
|
|
Suggestion, add appropriate checks and make your code full proof.
For instance, when you try to open the file (File.Open or File.OpenWrite)
- you can check for what all exception the API throws(MSDN should give you the list of exception it throws) and then you can return the appropriate Failure code(if your using a failure code mechanism) or rethrow the exception with a proper message based on the type of exception that occured.
- you should also add checks like File.Exists etc. The more checks you put the more confidence you will have.
- and if you are still not confident of things then additionally have a generic exception block for unhandled scenarios.
Well, in addition to the above you should have a finally block to release the lock no matter what happened in the processing.
|
|
|
|
|
This is a c#/sql reporting services problem.
Basically we have a c# application using the ReportViewer control to view sql reports. The problem is we have the c# culture set to display dates dd-mm-yyyy. When we go to view a report, it works fine, but the textboxes for the date parameters are refreshed incorrectly, they swap the month and day values. If we change the culture settings for the application to mm-dd-yyyy, it works fine, but this is unacceptable since it changes for the whole application.
Thanks in advance for any help
|
|
|
|
|
If anyone else is having this problem, I ended up solving it by just hiding the parameter controls and creating my own
|
|
|
|
|
Hello. In my project i have parsed my database into xml files. I done this by using typed dataset's writexml feature. After doing this and transfering these files to a remote machine that has the same database schema i need to merge that data from the xml to the machine's database.
In every row of every table there is a filed called last changed which i want to use to determin if the row is more current than the one on the machine's database.
How can the merging from the xml to the sql server be done? any ideas guys
|
|
|
|
|
Code. That's about it, really. Read the XML, write code to do the inserts.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
If this is a full-blown SQL Server box, you probably want to look at using SSIS to do this.
|
|
|
|
|
Any tutorials? please thank you
|
|
|
|
|
Hello,
I can't find what information I need, so I turn to you, the forum readers
This program I'd like to write--I'm trying to figure out how to print on paper a grid of squares with some custom info in each square. The problem I have is twofold: How do I print the squares, and how do I print the info in the squares all centered up and looking nice? Is there a way to tell where exactly text should be printed, or am I at the mercy of the printer?
Thanks for your time,
Michael Fritzius
|
|
|
|
|
Hello,
If you use PrintDocument control, you should be able to register for PrintPage event, which will give you Graphics object of page you are drawing. Using it (and additional info like resolution in X/Y, page marings) you should be able to draw whatever you want, just like in Paint event.
|
|
|
|
|
look into the Graphics class, when printing you basically pass a Graphics object with all your drawing on, so you will draw your grid and text on a Graphics object then pass that to the printer, with formatting options such as page orientation and margins if required.
The Graphics class has alot of build in methods for drawing rectangle etc by passing the location and size you want.
Also there is a DrawString method for drawing text, and a very useful MeasureString method you can use to determine the position to draw the text
Do a google for 'C# Graphics' and 'C# Printing' im sure you will get all the info you need
Hope this helps.
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
Hi,
printing is, or can be, very similar to painting to screen; you can reuse the exact same code however you will get different widths, heights, resolutions.
You might have a look at my Sokoban article, it has a Board class that supports printing.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Sunday, June 12, 2011 8:04 AM
|
|
|
|
|
I would use Word or HTML.
|
|
|
|
|
I have 20 years plus embedded experience but am new to C# and Windows CE so this will be a basic question...
I am developing a C# ap that requires some interface housekeeping to be done every 10ms. This ap is being tested on XP pro but will eventually go to an embedded device running Windows CE 6.
In normal embedded environments I would set up a hardware timer in the cpu and put the function in an interrupt routine.
We will have a small number of threads running that will be doing inbound message handling, MMI and some other functions. I think I need to have a "timer" thread called every 10ms to do this housekeeping so I have been looking at the various timer options. From Luc's excellent article on timers I see that the resolution of all timers except the multimedia timer will not be good enough.
So, am I barking up the right tree? Is there a better way? (Note that the housekeeping function varies in length)
Your input would be very much appreciated.
Many thanks Bruce
|
|
|
|
|
The majority of time I see requests requiring that sort of resolution it is because of a flawed approach. I don't want to suggest that your need is inherently flawed but maybe looking at the problem from another angle may device a solution that does not require 10ms housekeeping intervals, or even intervals at all. Events can work wonders if used correctly.
Need custom software developed? I do C# development and consulting all over the United States.
If you don't ask questions the answers won't stand in your way.
Doing a job is like selecting a mule, you can't choose just the front half xor the back half so when you ask me to do a job don't expect me to do it half-assed.
|
|
|
|
|
You'll need to add a reference at the top of your code for
using System.Threading;
Then in your code just add a sleep with:
Thread.Sleep(10); // Time in milliseconds
Hope this helps
Tom
|
|
|
|