|
HI..
I developed mvc3 website with webservice which is working fine on local system but when i uploaded that site on server i'm getting 404 error...Please give me the solution
Here is my code for webservice call.
$.ajax({
type: "POST",
contentType: "application/json; ",
url: "../../WebService1.asmx/addtoqueue",
data: "{'bookid':" + bookid + "}",
dataType: "json",
success: function (data) {
if (data.d == "login") {
// alert(data.d);
document.getElementById('msgp').innerHTML = "Book Added To Queue</br></br>";
$(".click").click();
}
else {
document.getElementById('msgp').innerHTML = "Please Login to Proceed !!</br></br>";
$(".click").click();
}
},
error: function (result) {
alert(result.text);
}
});
Thanks in advance
|
|
|
|
|
Hi,
Since most of the free api's are not accessible(In India) i want to send sms via phone.
I Googled it but all i got to know is, it can be done by AT commands.
Can anyone please help me out with a simple code.
Thank you.
A used key is always better than a new one.
|
|
|
|
|
Can someone nkows how to implement a real time event notification
like one on facebook?
Using ASP.NET MVC 4 and C#?
|
|
|
|
|
Sounds like you're looking for SignalR[^].
Quote: SignalR can be used to add any sort of "real-time" web functionality to your ASP.NET application.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I want to start for a new application for the bus reservation system.
I want to generate a seating layout dynamically. Every bus has different seating layout.
i am not getting any idea how to start , which controls should i use , or which concept should i use to implement this ... please give me any suggestion or Idea.
|
|
|
|
|
|
For a starter, try this:
1. Store your row and column configuration for each bus in a database in multiple tables that are normalized.
2. While rendering the page, place a ASP.NET Panel or PlaceHolder control and generate the inner html yourself.
3. Use a DIV control for each seat and set it's size as square. Make it clickable and assign a JavaScript method to its onclick event.
4. When a seat is selected, change the DIV's CSS style to a predefined style that gives a visual clue that it is selected and maintain a JavaScript array to store the state of each seat.
5. Store the array information in a hidden field and pass it back to the server on postback.
This might seem to be very rudimentary, but I'm sure you'll find it exciting. You'll also learn a lot of HTML, CSS, JavaScript, etc. that are essential to mastering any web development technology.
|
|
|
|
|
That seems to be a common homework question. Beyond thatraja's movie theatre example, the question was also often asked for airplane/flight seat booking system.
It is important that you get used to the bsaics of software development. divide the big problem into many small problems, until you can solve each of them. And then combine the solutions. Try it. Perhaps you'll have to iterate several times, but only by doing it will you learn it.
|
|
|
|
|
Hi,
I havn't worked in such projects. But i think there will be few types of seats based on the bus and you would be knowing the seats count, booked seats no. and other related information from database during the page load. So that you can load different types of images as seats inside the DIV initially. When the user cliks on the seat, you have to show the different image like seat has booked.
Thanks & Regards
Ashok
|
|
|
|
|
i have requirement for my project .... that i need to provide Edit template Facility to user using ASP.Net & C#. i will provide user templates...he can select that template and edit that for that i need a solution.how to achieve EDIT TEMPLATE functionality.after editing that template he can download it.
|
|
|
|
|
I'm creating a WCF service to go in my ASP.NET application. I'm at the beginning stages so mostly what I have is design questions.
So basically there is data that I would like people to pull out but only if they are authenticated. (Everyone pulling data would be external). The way my application is designed is I have a certain ID that associates users with a specific company. So my end goal is to allow people with those companies to query data for their company only.
So my thought was to create a table in my database that would have three columns. CompanyID, UserKey, UserSecret. My thought was that they would somehow pass the userkey and usersecret when they first initiate the connection to WCF. On the backend it will retrieve the CompanyID based off the key and secret.
The reason for doing this is so when they call GetAllUsers() it will only get all users for their company and not other companies.
So my questions are:
* Is my design wrong or is there a better way to accomplish this?
* I chose not to use active directory authentication due to the added time it will take to authenticate a user against AD vs SQL
I was thinking along the lines of the way SoapHeaders work. They set the SoapHeader when they create teh connection. Then each method on the web service would compare the key & secret against the database to make sure it existed (if it did I would get the CompanyID back and use that for the methods such as GetAllUsers() )
Thanks in advanced!
|
|
|
|
|
Here is what i'm trying to do but having issues getting it to work since SecureAuthHeader is always null:
[DataContract]
public class SecureAuthHeader
{
[DataMember]
public string UserKey { get; set; }
[DataMember]
public string UserSecret { get; set; }
}
[AspNetCompatibilityRequirements(RequirementsMode=AspNetCompatibilityRequirementsMode.Allowed)]
[ServiceBehavior(InstanceContextMode=InstanceContextMode.PerSession)]
public class CPApi : ICPApi
{
public SecureAuthHeader Authentication;
public void SetAuthentication(string _userkey, string _usersecret)
{
Authentication = new SecureAuthHeader();
Authentication.UserKey = _userkey;
Authentication.UserSecret = _usersecret;
}
public List<UserObject> GetAllUsers()
{
string companyCode = IsAuthenticated;
}
private string IsAuthenticated
{
get
{
if (Authentication == null)
throw new FaultException("You must authenticate first.");
try
{
DataTable ds = SqlLibrary.ReadSql("SELECT CompanyID FROM ApiAccess WHERE CustomerKey=@CustomerKey AND CustomerSecret=@CustomerSecret",
new SqlParameter[] { new SqlParameter("CustomerKey", Authentication.UserKey), new SqlParameter("CustomerSecret", Authentication.UserSecret) });
if (ds == null || ds.Rows.Count == 0)
throw new FaultException("Invalid authentication.");
return ds.Rows[0]["CompanyID"].ToString();
}
catch (Exception ex)
{
throw new FaultException(ex.Message);
}
}
}
|
|
|
|
|
Can a Linux client machine use an ASP .NET app residing on a Windows server?
|
|
|
|
|
Yes.
Your question is equivalent to: Can a Linux client machine use a web-site. The server's OS and the technology used to build the site are irrelevant.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks Richard. I'm glad to hear that. I thought that was the case but I wasn't sure and my Google searching didn't give me any answer.
|
|
|
|
|
how is create android application using .net
jegan
|
|
|
|
|
This[^] will help you get started.
|
|
|
|
|
This question has nothing to do with ASP.NET; in future, please try to chose the forum which matches your question. For this question, the Android[^] forum would have been appropriate.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
AS a part of my project I need to build 3D scatter charts in a ASP.Net website. could anybody Please suggest me some ASP.Net 3D scatter chart controls open source controls available.
|
|
|
|
|
Did you?[^]
Codeplex[^] with 285 results using keyword "chart"
If you can't find any suitable opensource, then you have to customize the code or go with commercial products(Codeproject catalog[^]).
thatrajaCode converters | Education Needed
No thanks, I am all stocked up. - Luc Pattyn
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is - Henry Minute
|
|
|
|
|
Hi I have a SQL Server Table named News with the following
columns-id,Title,Body,Created datetime and
Inside It's a column 'Number of clicks'.
Now I want to increment it by 1 when the title of a particular news is clicked.I need the c# code.Help, i can't do it
|
|
|
|
|
There's no code. You should use Google & put your effort for start, then come here for help hereafter.
You just need to update the value(increment) of "Number of clicks " column for particular ID (when you click particular news). Query should be like below
UPDATE Table_Name SET Numberofclicks = Numberofclicks+1 WHERE ID=@ID
Customize this sample[^]
thatrajaCode converters | Education Needed
No thanks, I am all stocked up. - Luc Pattyn
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is - Henry Minute
|
|
|
|
|
I have an requirement for dynamic report generation. like the user itself select the tables, columns, filters, groupby etc.,
once they selected all they will be able to see report.
I need to know how to do this.. To be clear
have u seen "Query designer" in sql mgmt. studio... same as this I need to generate the query.
please help me . Its urgent
Thanks
Ravi
|
|
|
|
|
This is referred to as "ad hoc" reporting. If you search for ad hoc tools there are 3rd party products that do a good job. Or, if you know SSRS some you can use SSRS. It has a Report Builder built into it. You'll have to expose a Report Model which is a representation of your data and then the users can pull whatever fields you have exposed.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
hi,
I've designed this user control(*.ascx) in asp .net,
<script type="text/javascript">
function but_ok() {
window.returnValue = "ok";
window.close();
}
function but_cancel() {
window.returnValue = "cancel";
window.close();
}
function but_yes() {
window.returnValue = "yes";
window.close();
}
function but_no() {
window.returnValue = "no";
window.close();
}
</script>
<asp:Button ID="dlg_ok" runat="server" Text=" OK " />
<asp:Button ID="dlg_cancel" runat="server" Text=" Cancel " />
<asp:Button ID="dlg_yes" runat="server" Text=" Yes " />
<asp:Button ID="dlg_no" runat="server" Text=" No " />
and i've written these codes to assume each button behavior
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
dlg_ok.Attributes["onclick"] = "javascript:but_ok()";
dlg_cancel.Attributes["onclick"] = "javascript:but_cancel()";
dlg_yes.Attributes["onclick"] = "javascript:but_yes()";
dlg_no.Attributes["onclick"] = "javascript:but_no()";
}
}
now I want to show this page like a dialog and use it as a message box,
so I have 2 questions
1-how do I display this control or an aspx page like a dialog?
2-how do I retrieve values after clicking each button?
I will appreciate if any one could help
|
|
|
|