ASP.NET
|
|
 |

|
Apologies for the shouting but this is important.
When answering a question please:
- Read the question carefully
- Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
- If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
- If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|

|
For those new to message boards please try to follow a few simple rules when posting your question.- Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
- Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
- Keep the subject line brief, but descriptive. eg "File Serialization problem"
- Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
- Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
- Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
- If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
- Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
- Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
- Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
- If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
- No advertising or soliciting.
- We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|

|
i am trying to create a shopping cart, on productdetails page i displaying productid, ProductName, productImage, ProductPrice and Buy Now Button. i have also created a movable shopping cart by using javascript. Now my problem is i am not able to pick the selected items id and send it javascript function for shopping cart. please guide me how to pick the id of the selected item and send it to the javascript function.
Thanks in Advance
|
|
|
|

|
Hi guys,I'm mohamed hussain working as dotnet developer.can anyone point out what are all the technical difference between telerik and devExpress control ?????
|
|
|
|

|
You need to go and do some research into the subjects; it's unlikely that anyone is going to be able to answer such a question.
Use the best guess
|
|
|
|

|
i already tried a lot.but still it's complicated to find out :(
|
|
|
|

|
Well it's complicated for everybody; but that's what being a developer is all about.
Use the best guess
|
|
|
|

|
I have no idea what I am wrong. Needless to say it is giving me a compiler error "Error 1 'clsWebServices' does not contain a definition for 'FindAddress' and no extension method 'FindAddress' accepting a first argument of type 'clsWebServices' could be found (are you missing a using directive or an assembly reference?)"
What do I need to do to make this Web Method / Web Reference work properly? This is for a local Access .mdb file that resides under app_Data.
This is what I have under App_Code for clsWebSerices.cs:
using Microsoft.VisualBasic;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Data.OleDb;
using System.Web.Services;
And for clsWebServices.asmx:
<%@ WebService Language="C#" CodeBehind="~/App_Code/clsWebServices.cs" Class="clsWebServices" %>
frmAddressBook.aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="frmAddressBook.aspx.cs" Inherits="frmAddressBook" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server" action="clsWebServices.asmx" method="post">
<div>
<asp:Label ID="Label1" runat="server" Text="Find Last Name: "></asp:Label>
<asp:TextBox ID="txtFindLastName" runat="server"></asp:TextBox>
<asp:Button ID="btnFindLastName" runat="server" Text="Search Now"
onclick="btnFindLastName_Click" />
<br />
<br />
<br />
<asp:Label
ID="lblMessage" runat="server"
Text="Search Result (first record to match)" Font-Size="XX-Large"></asp:Label>
<br />
<br />
<asp:Label ID="Label2" runat="server" Text="First Name: "></asp:Label>
<asp:TextBox ID="txtFirstName" runat="server" BackColor="#FFFFCC"></asp:TextBox>
<br />
<br />
<asp:Label ID="Label3" runat="server" Text="Last Name: "></asp:Label>
<asp:TextBox ID="txtLastName" runat="server" BackColor="#FFFFCC"></asp:TextBox>
<br />
<br />
<asp:Label ID="Label4" runat="server" Text="Email: "></asp:Label>
<asp:TextBox ID="txtEmail" runat="server" BackColor="#FFFFCC"></asp:TextBox>
<br />
<br />
<asp:Label ID="Label5" runat="server" Text="Phone Number: "></asp:Label>
<asp:TextBox ID="txtPhoneNumber" runat="server" BackColor="#FFFFCC"></asp:TextBox>
</div>
</form>
</body>
</html>
The code behind:
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class frmAddressBook : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnFindLastName_Click(object sender, EventArgs e)
{
lblMessage.Text = "";
try
{
clsWebServices serviceObj = new clsWebServices();
dsAddress dsFindLastName = new dsAddress();
string TempPath = Server.MapPath("~/App_Data/AddressBook.mdb");
dsFindLastName = serviceObj.FindAddress(txtFindLastName.Text, TempPath);
if (dsFindLastName.tblAddressBook.Rows.Count > 0)
{
DataRow r = dsFindLastName.tblAddressBook.Rows[0];
txtFirstName.Text = r["FirstName"].ToString();
txtLastName.Text = r["LastName"].ToString();
txtEmail.Text = r["Email"].ToString();
txtPhoneNumber.Text = r["PhoneNumber"].ToString();
}
else lblMessage.Text = "No records found!";
}
catch (Exception ex)
{
lblMessage.Text = ex.Message;
}
}
}
I have tried to add a WEB REFERENCE in VS2008 and it says :
This web service is using http://tempuri.org/ as its default namespace.
Recommendation: Change the default namespace before the XML Web service is made public.
[WebService(Namespace="http://microsoft.com/webservices/")]
public class MyWebService {
}
|
|
|
|

|
The error message is quite clear, and also correct. The class clsWebServices doesn't contain a method called FindAddress. That method is defined on a nested class called Service1.
Either move the method to the outer class, or change the class you're creating:
clsWebServices.Service1 serviceObj = new clsWebServices.Service1();
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|

|
you can share for me source code form comment ?
I want to create form comment with avatar(of user) and it can edit, delete, and save to database.
thanks !!
|
|
|
|
 |
|
|
General
News
Suggestion
Question
Bug
Answer
Joke
Rant
Admin