We've got a product built using ASP.NET web forms (3.5), and are investigating adding an API to allow other applications to access data and business logic within the application.
What is the best way to implement this? I'm inclined to go down the route of using Http Handlers to read posted XML and return XML, but I'm sure there must be a better way. Is it advisable to use something like WCF instead?As the product will be downloaded and installed by users on their own servers (instead of hosted), it seems like there's a lot of pressure to get it right the first time as making changes will be hard once users start downloading and using the product.
I am generating a text file on server. I want this file to be able to get downloaded by clients accessing the site. Like, when the file is generated a link should appear on the page that says,"Download the File". Clicking that will run a code that will download te file and save it on client's PC. How to do this?
I just want to know how can I put a file downloadable link on aspx web page. I mean if I want to put a audio file to download which I have in a folder on server, how can a link could refer to that file, for the user to download it or listen online?
I need to download files from server through code. The files are located under the server's C://DownloadFiles/*.txt, but i dont want to give hardcoded path in the code. My query is can we use Server.MapPath here, if yes what will be the syntax for this.
I have 2 blocks of code, I would get the functionality I am looking for. The first block of code downloads a gridview to excel using the download dialog I am looking for:
i want to create the sperate gridview where a show most downloadable file and this girdview i show in my main naats aspx page.......can any 1 tell me how it is possible to do that...visit this website for more understanding
i have a product data entry form in which if somebody wants to add more data for one product then there is link called more and opens a new aspx page. In which i have a 40 textbox and dropdown list associated with them. so i have a data like interger id of dropdown list and textbox value for that dropdown list interger,something kind of key and value pair. I want to store that and pass it to the original pair so i can add that to the database once the whole product is created. I do not want to use session to store this much of data.
I'm trying to add a product to one or more categories, but I'm going nowhere slow.
Table layout:
[Code]....
[Code]....
[Code]....
I been trying everything to add a product to a category, but without luck. I would have though this was the "right" way:
[Code]....
On my "Create" product page, the product is created but I just can't find a way to link a product to one or more categories. It just skips back to the Create page, even though I have put a Redirect in the Controller.
Usually in an ASP.NET Web Application I would write - My.Application.Info.ProductName or My.Application.Info.Version, but I'm looking at an older ASP.NET Web Site and it doesn't have the Application option.
When a Product is deleted, I am simply displaying a message to User like "Are U sure ....". I am doing it like:
<asp:TemplateField HeaderText="Delete"> <ItemStyle Width="5%" HorizontalAlign="Center" /> <ItemTemplate> <asp:ImageButton runat="server" CommandArgument='<%#Eval("Gallery_ID")%>' BorderStyle="None" ID="BtnDel" ImageUrl="../Images/icon-delete.gif" CssClass="imgbutton" CommandName="DeleteRow" CausesValidation="False"></asp:ImageButton> </ItemTemplate> </asp:TemplateField> protected void GvGallery_RowCreated(object sender, GridViewRowEventArgs e) { ImageButton btnDelete = (ImageButton)e.Row.FindControl("BtnDel"); if (btnDelete != null) btnDelete.Attributes.Add("onclick", "return check();"); } <script language="javascript"> function check() { if(confirm("Are you sure u want to delete this Gallery? Once deleted it cannot be retrieved.")==true) return true; else return false; } </script>
But Now, my requirement is that I want to display "Product Name" with in the message like "Are U sure U want to delete <Product Name>". How can this be done??
- Products (Primary key productId) - Categories (Primary key categoryId) - Product_to_categories (Table with two fields, CategoryId and ProductId)
One product can be assigned to multiple categories.
How should I download the products from specific category?
Now I retrieve them in that way:
int PageNum = 1; int PageSize = 10; int categoryId = 5; var categoryModel = db.Categories.FirstOrDefault(c => c.CategoryId == categoryId); var results = (from p in categoryModel.Products select p).Skip((PageNum - 1) * PageSize).Take(PageSize).ToList();
But when there is a lot of products in category my server crushed. I want only 10 products per page.
I am trying to pull all products from Amazon Product API, but as far as I know, that's impossible to do unless they give you access to Bulk Data Feeds.
I'm trying to get a decent sorting algorithm for my products database. Users can vote for their products with using scores from 0 to 5 (.5 scores are also possible like 2.5). My table structure currently looks like this:
Whenever a user votes I'm calculating the finalscore very simple like (TotalPoints / NumberOfVotes) = FinalScore. Then I sort the table on FinalScore and NumberOfVotes.Now while this works it's not excactly fair because a product which has only 1 vote of 5 stars can easily come in top rankings.I admit I'm not very good at statistics or algorithms to get a fair product listing and what I'm looking for is something which is not over the top diffucult but which is more fair then the method I'm using now.
I want to rate the product how can i check that how many users rated the product on that basis i want to show the rating.Many users view the product but they dnt date , i only want those users count who rated the product. My application is a website. I calculated the no og view of a product and of website. but want to maintain the no of users rated ?
I am currently building 3-tired ASP.NET 3.5 Web application which has workflows built in for manager approvals. Currently there is a dashboard on the homepage of the website where all the pending approvals are displayed in a webpart. I want to build a plugin for MS Outlook so that whenever there is a new request for approval I want that request to show up in MS outlook. Where do I start with this? Do I have to expose my business logic layer through webservices?
i am developing chat application using vb.net and asp.net where i am having a div tag inside which i am displaying the messages posted by the online users what my problem is when the messages are more and exceeds the height of the div tag then i am not comfortable to view the previous messages because i have set the scroll bar position to always to be pointed to bottom.