The same way you'd write any other SQL query in the code-behind.
using (SqlConnection connection = new SqlConnection("YOUR CONNECTION STRING"))
using (SqlCommand command = new SqlCommand("SELECT CASE WHEN @Flag = 1 THEN 'Yes' ELSE 'No' END FROM YourTable", connection))
If you want a more detailed answer, then you're going to have to provide a more detailed question.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
The web application for the program proved to be too difficult for average people to use. I used CKEditor for folks to create the messages, and wrote a service to send them from the website.
But I changed the service over to Entity Framework, and I'm having trouble with it. So for black Friday, I wrote a windows app to send the Black Friday Emails, and it was just easier to do. So I thought I'd write a windows app to do the whole thing.
It's been so long since I wrote the service, I forgot how to debug it.
I wrote a web service, and tied it to an asmx page.
Then I wrote a Serializable Class, with get and set, for the request and response.
In the web service, the input is the request class, and it outputs the response class. Used SQL Linq for the database calls.
Then in the Windows App, I created a service reference, using the WSDL that is generated when you add ?wsdl to the url. And in calling the service, I just changed the endpoint, and used basic http binding to test it.
So the class I need for the request and response are contained in the Service Reference.
And I just used those classes as a ListOf, to populate a listview control.
So I guess the whole thing happens with SOAP.
I'm impressed, had no idea it would be that easy to do. I've always consumed web services, but never wrote one. The ones I wrote were for JQuery, and returned JSON back to be parsed.
Most things are easy - once you know how to do them!
There's a well-known story about a mathematician giving a lecture - he's scribbling away on the blackboard, one equation after another, saying "and so it follows... (scribble scribble) therefore ... (scribble scribble)..." and then he gets to "..and thus it is obvious that (scribble scribble)" - then he pauses and adds "Well, I think it's obvious... hmm..." He stops and thinks for a bit, scratching his beard. Consults his books and notes - finally looks up triumphantly and exclaims "I was right! It is obvious!"
The fact that you are doing this remotely is a fairly important piece of information you should have included in your original question.
If you want to access the files remotely you'll need to do it via a UNC, which is the format you use to reference files over a network. If the files are at c:\inetpub\wwwroot\logs on a machine called "MyIIS" then you can access that folder from another machine using \\MyIIS\c$\inetpub\wwwroot\logs. This will need admin rights on the target machine. An alternative is to explicitly share the logs folder so you can control the access rights and use \\MyIIS\logs
Not a question. However, if it were a question regarding what can a heavy traffic website handle the answer would still be "it depends." Availability and responsiveness are dependent on many different factors including the performance of IIS and then also of the sql db and the network. Many, many, different factors.
There are only 10 types of people in the world, those who understand binary and those who don't.
i am novice in asp.net and i want to write an sql query that will calculate student grade and grade point base on the condition bellow.
WHEN EXAMS BETWEEN 75 AND 100 THEN 'A'
WHEN EXAMS BETWEEN 70 AND 74 THEN 'AB'
WHEN EXAMS BETWEEN 65 AND 69 THEN 'B'
WHEN EXAMS BETWEEN 60 AND 64 THEN 'BC'
WHEN EXAMS BETWEEN 55 AND 59 THEN 'C'
WHEN EXAMS BETWEEN 50 AND 54 THEN 'CD'
WHEN EXAMS BETWEEN 45 AND 49 THEN 'D'
WHEN EXAMS BETWEEN 40 AND 44 THEN 'E'
WHEN EXAMS BETWEEN 40 AND 0 THEN 'F'
please how can i do this query, than you