I have some experience in developing a shopping cart in Dreamweaver. Now I wanna develop a fully functional shopping cart with Paypal payment integration in Visual Developer Express Edition 2010. My question is - Is there any nice tutorial to develop fully functional Shopping cart with Paypal Integration in ASP.NET?...
I have seen some tutorial some of them are without Payment System and Some of them are content management systems. I wanna develop my own. what is best Tutorial to develop fully functional shopping cart with Payment System in Visual Developer Express Edition 2010.
Is it possible to create a "drop-in" web service? What I would like to do is create an .svc file that can be placed into a web directory on IIS and accessed (and executed) via its URL, without having to install any other files and without changing any configuration files.I am investigating a possible security problem in a web application that allows uploading .svc files. If it is possible to upload and then execute an .svc file, this would be a big security problem for this application. Unfortunately I am not a .NET developer, so I am probably missing a lot of things here.I know that it is possible to put the service interface and implementation straight into the the .svc file after the "Service Host" directive. Here is my .svc file:
<%@ ServiceHost Language = "C#" Debug = "true" Service = "EchoService" %> public interface IEchoService { [code]....
Now when I access http://localhost/test1.svc I get an exception from .NET: Service 'EchoService' has zero application (non-infrastructure) endpoints. This might be because no configuration file was found for your application, or because no service element matching the service name could be found in the configuration file, or because no endpoints were defined in the service element. I understand that normally you are supposed to configure web service end points in web.config or app.config file. From some Googling I have also learned that it is possible to configure endpoints programmatically by defining your own ServiceHost and ServiceCodeFactory. I have found some examples, but couldn't get them working.I would really appreciate if somebody can either tell me "No, what you are trying to do is impossible, because..." or show how I can add the necessary code to the example above to have an executable service.
Update: using Josh's suggestion I finally got it working. See my answer below for the working code.
In ASP.NET I'd like to create a link which points to a specific Uri and send this link in an email to a user, for instance something like http://www.BlaBla.com/CustomerPortal/Order/9876. I can create the second part of the Uri /CustomerPortal/Order/9876 dynamically in code-behind. My question is: How can I create the base Uri http://www.BlaBla.com without hardcoding it in my application? Basically I want to have something like:
http://localhost:1234/CustomerPortal/Order/9876 (on my development machine) http://testserver/CustomerPortal/Order/9876 (on an internal test server) http://www.BlaBla.com/CustomerPortal/Order/9876 (on the production server)
I am trying to put together a page where files uploaded by a specific users would be listed in a bulletedlist and I am stuck. Here's the rundown:
Users login, they upload files which are saved to disk in the user's own directory. All the file's information, including the path, is stored in a SQL database.
The user has also its own page, where there is a bulletedlist (set as a hyperlink) that gets the filename from the SQL. However, the path to the file is incomplete.
The file is saved to the site's directory structure: C:WebsitesSiteUploadsUserFile.pdf. However, the hyperlink shows[URL]
Can anyone point me to the right direction? Below is a snippet of the upload method and the retrieval to build the bulletedlist.
Dim Result As New DataTable DataAdapter.Fill(Result) 'bind data to visible surname/name grid If Result.Rows.Count = 0 Then NoInputBottom.Text = "No Results. Please widen your search criteria and try again" NoInputTop.Text = "No Results. Please widen your search criteria and try again" Else GV.DataSource = Result GV.DataBind() End If
I have also tried moving the check to the gridview like so:
If GV.Columns.Count = 0 Then NoInputBottom.Text = "No Options Selected: Please select your search criteria and try again" NoInputTop.Text = "No Options Selected: Please select your search criteria and try again" End If
When I run the code. the noinput labels do not have value, the null check seems to be failing? how to display a message if the search returned no reults.
I am having problems with the following. On debugging I find that when strKeywords = '', reader = "System.Data.SqlClient.SqlDataReader". However, as soon as strKeywords takes the value of anything else, reader = nothing. But the stored procedure handles the arguments fine, so I am very confused!
i m using three web services in my project ... while Webservice1 returns data in a set of 50 records at a time .. the other 2 webservices return the entire resultset .. the consolidated results(20 per page) are to be displayed in sorted fashion...now the query is to find the best way to retrieve the data from the 3 sources while applying the sorting across the consolidated results. I have developed some code for this but am looking for something better ..
I am having some problems creating a asp textbox dynamically in a webservice and a ajax calendar extender. Is this possible to do. I did the example with the dynamic lable and that works fine, but when it comes to creating a textbox i get this error "Control 'txtSDate' of type 'TextBox' must be placed inside a form tag with runat=server"
Here is my code.
[OperationContract] public string LoadUserControl(string message,int id) { using (Page page = new Page()) { UserControl userControl = (UserControl)page.LoadControl("/UserControls/BudgetItemTD.ascx"); (userControl.FindControl("lblBudgetName") as Label).Text = message;
Note: You may not need to read the whole thing to know what's wrong... skip down to the part about the 3 scenarios if you'd like. Only read the begin if you'd like some background info on how I've tried implementing this and where the errors occurred.To begin with, I'm trying to retrieve a list of Clients stored in the CRM_Clients table for a given callerId.I retrieve the clients from my Controller with the SelectLiveClientsForCaller method. The message is then passed on to the DAL through the static Instance method in the DataProvider class:
public List<Client> SelectLiveClientsForCaller(int callerID) { List<Client> results = new List<Client>();
I am using if (document.getElementById('<%= MainImg.ClientID %>').complete) { hideLoadDiv(); }
to hide a div which indicates the image is not loaded yet,but it hides before the image has finished loading and is shown, while the browser is giving me a message that the page is still transferring data from the server :S
Is there another function I can use to make sure that the image is fully loaded?
I am in charge of converting an ASP.NET web application into fully AJAX based application. I know Javascript and Jquery very well.
Initially I thought to point every anchor tag's click event to JS function and to call stuff via ajax and to populate the body and so on. I encountered a problem when it came to ASP.NET Form on every page and when there was need to make a post-back. I decided to point every Form tag's onSubmit event to a JS function to post stuff using ajax and to get results and I got to know this is not possible with ASP.NET as every time where is a button click, there will be post back so it's hard to let page know what button was clicked.
I then decided to use ASP.NET built-in AJAX controls to use with Forms which is pretty easy and worked like the way they should. Now I am stuck with the question of which I should go with?I like to be JS way because it's more customizable than AJAX.NET.
I want to create custom control (let's name it DesignPanel) that will allow user to design his own webpage structure that would be stored in a sitemap file. This Design Panel will have child controls inside ( SiteElement). User will build page strcture by connect Site Elements, customize them ( like change name) and add new ones.
This last point is main issue for me. Should I add those Site Element controls dynamically like DesignPanel.Controls.Add(new SiteElement()) in UpdatePanel control or there is better approach ( adding them to DOM structure by javascript, something diffrent)?
I trying to write a javascript generate <%= element.ClientID% > where element is one of the input parameter of function. I am trying to write a variable
var elementName = "<%=" + element + ".clientID%>"
which is giving an error
CS0117: 'string' does not contain a definition for 'clientID'
I'm want to make a BLOG site and that should be fully Dyanmic.Means from Questions to answers all should be fully Dyanmic but need admin approval to post.can you share some links where i can get more about this.
In my ASP.NET app, I noticed that the results of any web service calls are cached. I don't want any results to be cached, how can I stop the browser from caching the results?Update:Here's the proxy code generated by calling the web service URL appending '/js', e.g. /mywebservice.asmx/js
I need to create a table with just 1 column containing times (starting from 4hrs) which increase in increments of 10 seconds for each row. So it needs to look something like this:
This will obviously take a long long time to hard code so I'm looking to create it dynamically. Based on what i'm currently trying to learn I'd like to be able to do this using jquery or asp.net (vb) but anything will do as long as it works!
function SetScrollEvent() { window.scrollTo(0, document.body.scrollHeight);}
I update update panel from server side like below.
protected void rptList_ItemCommand(object source, RepeaterCommandEventArgs e){ //HiddenField hiddenId = e.Item.FindControl("hiddenId") as HiddenField;Label lb1 = e.Item.FindControl("Label2") as Label; //Button bt = e.Item.FindControl("Button2") as Button;if (e.CommandName == "myclickevent"){ // your codes here...SqlConnection conn = new SqlConnection(constr);SqlCommand
[CODE] .....
I use repeater and repeater have button on button click i update the update panel. now where i have to call the javascript function so that it execute after update panel fully loaded. I want to call javascript function after page fully loaded.
I have a web service that returns an object that I attach to a gridview's datasource. is there a way to sort the data from the web service before attaching it to the datasource?
I'm having a confusing issue concerning web services, XmlDocument return type and XmlProcessingInstruction. I've basically got a web service that returns an XmlDocument containing a list of search results. In order to make it a little more user-friendly, I'd like the XmlDocument to include a Processing Instruction (<?xml-stylesheet type='text/xsl' href='book.xsl'?>) for the inclusion of an XSL stylesheet. Is there something in the ASP.NET pipeline that would prevent this? I'm using the following code (lifted from the MSDN documentation of the CreateProcessingInstruction() method) in a test WebMethod and it doesn't seem to include the processing instruction.
A sample web service app I have been practicing with has two web methods: 1) HelloWorld -- which I can read the data from no problem - just a string 2) ClientData[] -- which returns an array of struct objects -- this is where I have the question.
Here is my instantiation of the webservice in my winform app for reading from HelloWorld
myWebSvc1.WebService1 s1 = new myWebSvc1.WebService1(); string y = s1.HelloWorld(); //--no problems so far here Console.WriteLine(y); //--but when I add the call to GetClientData() I have a problem List<ClientData> ls = new List<ClientData>(s1.GetClientData(3)); //--problem here
public struct ClientData { public String Name; public int ID; } [WebMethod(CacheDuration = 30, Description="Returns an array of Clients.")] public ClientData[] GetClientData(int Number) { ClientData [] Clients = null; if (Number > 0 && Number <= 10) { Clients = new ClientData[Number]; for (int i = 0; i < Number; i++) { Clients[i].Name = "Client " + i.ToString(); Clients[i].ID = i; } } return Clients; }
If I browse the .asmx file -- the sample xml returns the following if I enter 3 for GetClientData function param
From my winform app I get the following error messages when trying to add the GetClientData function call above --
Error 1 The best overloaded method match for 'System.Collections.Generic.List<DSS_2008.Form7.ClientData[]>.List(System.Collections.Generic.IEnumerable<DSS_2008.Form7.ClientData[]>)' has some invalid arguments
Error 2 Argument '1': cannot convert from 'DSS_2008.myWebSvc1.ClientData[]' to 'System.Collections.Generic.IEnumerable<DSS_2008.Form7.ClientData[]>'
Error1 The best overloaded method match for 'System.Collections.Generic.List<DSS_2008.Form7.ClientData[]>.List(int)' has some invalid arguments
Error 2 Argument '1': cannot convert from 'DSS_2008.myWebSvc1.ClientData[]' to 'int'
How can I fix this so that I can read the result into my winform app? //--sample web service
namespace MyService { using System; using System.Collections; using System.Data; using System.Web; using System.Web.Services; public struct ClientData { public String Name; public int ID; } /// <summary> /// Summary description for WebService1. /// </summary> [WebService(Namespace="http://codeproject.com/webservices/", Description="This is a demonstration WebService.")] public class WebService1 : System.Web.Services.WebService { //--source of sample: http://www.codeproject.com/KB/webservices/myservice.aspx private const int CacheHelloWorldTime = 10; // seconds public WebService1() { //CODEGEN: This call is required by the ASP+ Web Services Designer InitializeComponent(); } /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { } //WEB SERVICE EXAMPLE //The HelloWorld() example service returns the string Hello World //To build, uncomment the following lines then save and build the project //To test, right-click the Web Service's .asmx file and select View in Browser // [WebMethod(CacheDuration = CacheHelloWorldTime, Description="As simple as it gets - the ubiquitous Hello World.")] public string HelloWorld() { return "Hello World bbb"; } [WebMethod(CacheDuration = 30, Description="Returns an array of Clients.")] public ClientData[] GetClientData(int Number) { ClientData [] Clients = null; if (Number > 0 && Number <= 10) { Clients = new ClientData[Number]; for (int i = 0; i < Number; i++) { Clients[i].Name = "Client " + i.ToString(); Clients[i].ID = i; } } return Clients; } } }