You maybe want to look in to RESTful services. See here[]as a starting point.
DoctorMick
Posts
-
WCF Service Browsable through any Web Browser -
Datagridview Arabic Localization? C# 2010 ApplicationThis should work. I've just tried it and it seemed to do exactly what you wanted.
dataGridView1.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
-
Access to stored procs on different database serversIt looks like you're using SQL Server so setting up a linked server on Server A should be all you need.
-
FindControl("id"); does not work - another alternative?I can't see any way of getting the control because it isn't a part of the pages controls but you should be able to get the value from the Request.Form collection after postback.
-
<%:Can someone tell me the difference between <%: and <%#. I'm guessing this is a new feature in .NET 4 (or MVC2?) but I can't google it because of the special characters. I'm aware this is probably a very simple question but I can't work out how to search for the answer myself. :((
-
MVVMHello all, I'm fairly new to Silverlight and MVVM and I'm struggling with the correct way of doing the simple task of changing the top level silverlight view. Using Silverlight 4 commanding I am binding a command on my view model to a login button on my main form and then calling an authentication service to ensure the credentials are valid, this is working and I can authenticate the user. What I am struggling with is the best way of closing the login screen and displaying another screen when I get a successful response from my service. From what I understand you cannot hook a callback event in the view to a command object and I should also be trying to avoid having any code behind in the view so where do I control the opening of a new view? Obviously, my ViewModel should know nothing about the view so I can't do it there, can I? The way I was going to approach it is still use the button bound to a command on the view model but use a bit of code in the view to hook an event to the view model which is fired when I get the successful login from the service. The event hooked up in the view would then control switching the views but from the examples I have looked at I am not convinced this is the best way forward. Am I missing something obvious or looking at the problem in completely the wrong way? I'm hopeful this question will have a straight forward answer but after hours of browing examples on the web I'm still none the wiser as to the correct approach.
-
Image not displayI might be missing something blindingly obvious here but you don't need to call Server.MapPath when setting an image url. Server.MapPath will give you the physical location on the server disk which is useless when the web page is sent to the client.
-
session objects get lost when republish the pageI can't remember off the top of my head, but does storing the session state in SQL get around this problem?
-
Thread.Abort in WCF Service hosted on WAS restarting the ServiceI don't know why you're experiencing the specific problem but you could look at using an alternative mechanism to Thread.Abort(). Have a read of this. It explains the problems around Thread.Abort and a neat alternative.
-
client side script for server controlChange onclick to onclientclick.
-
er diagram for hospital managment systemI'm scared, very very scared! :((
-
Problem in connect with Remote server??Are you using web services to connect to the remote server? I seem to remember an issue with user details not being able to be passed through from one web service to another.
-
Linking ASP.NET web controls with CSS styles [modified]What does the output HTML look like? What are you putting in the head place holder? Is the / missing from the end of due to a cut and paste issue or is it missing from your page as well?
-
Update button is greyed outDo you really expect someone to read all that code and try and help you? Try posting only the relevant code.
-
Javascript with multiple user controlsYou're have to prefix the function name and the control name with the unique id of the user control, e.g.
<%@ Control Language="C#"%>
function <%=this.ClientId%>_TimeEntryHoursOnClick()
{
if (event.keyCode == 38)
document.getElementById("<%=this.ClientId%>_Text1").value = parseFloat(document.getElementById("<%=this.ClientId%>_Text1").value) + 1
}There are better ways of doing this tho such as moving the javascript function outside of the user control and passing the object being changed to the function, i.e.
function TimeEntryHoursOnClick(theTextbox)
{
if (event.keyCode == 38)
theTextbox.value = parseFloat(theTextbox.value) + 1
}<%@ Control Language="C#"%>
I haven't tested the code above but it should work.
-
Simple progress bar code not working correctly.If you're doing your processes on the main thread then the gui won't be able to update as you'll have hold of the thread. Look at using a BackgroundWorker so your gui remains responsive.
-
Problem in DateTime conversion!! Please helpThe best thing to do would be to parameterise the query so the conversion work is done for you. Failing that, converting the date format in your query string to either yyyy-mm-dd or dd mmm yyyy should do the trick.
-
Unable to access controls on the pageI've tried this and managed to reproduce your error. Suprisingly, removing the following attribute from your page declaration seems to resolve it.
src="Search.aspx.cs"
-
System.Web.UI.HtmlControls.HtmlGenericControl --sessionWhat error are you getting? Can you show the code which sets the ID session variable?
-
abt page loadExpose a method on the user control to allow binding rather than binding when the control loads.