|
I'm using microsoft asp.net self updatepanel. and it's very good
|
|
|
|
|
If you are working with MVC framework, why dont you try out Ajax instead of update panels. Thats a much better option
|
|
|
|
|
HI All,
Please Explain me , if we select dropdownlist automatically get second dropdownlistDetails and if we select second dropdown list automatically get third dropdownlist details. my dropdownlist control present in gridview(EditItemTemplate field) like this...
<Columns>
<asp:TemplateField HeaderText="CID">
<ItemTemplate>
<%#Eval("CID")%>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList ID="catep" runat="server">
</asp:DropDownList>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="CatId">
<ItemTemplate>
<%# Eval("CatId")%>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList ID="cat" runat="server">
</asp:DropDownList>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="CateSubId">
<ItemTemplate>
<%# Eval("CategorySubId")%>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList ID="subcat" runat="server">
</asp:DropDownList>
</EditItemTemplate>
</asp:TemplateField>
</Columns>
Thanks&&Regards,
S.Hemanth
|
|
|
|
|
|
Yes..
Just to be clear the Cascading Drop Down is part of AJAX.
|
|
|
|
|
|
I need ur help on this. AM developing a windows application with vb.net and sql server database file(.mdf). After am through with the project, i decided to publish it using clickonce. But whenever i deploy the application, it wont save the record into the database.
|
|
|
|
|
Hi,
This is an ASP.Net forum. You will get more help (and quicker if you put in in the Windows forum). You also might want to describe what you mean by "it won't save to the database" (e.g. errors you are getting etc) as there is a lot that can go wrong between the user clicking the button (or whatever) and the database completing the update.
|
|
|
|
|
I have the following class code to add support ticket:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using MySql.Data;
using MySql.Data.MySqlClient;
using System.Configuration;
using System.Globalization;
using Microsoft.Win32;
using System.Diagnostics;
using System.Reflection;
using System.IO;
using System.Security.Cryptography;
using DevExpress.Web.ASPxUploadControl;
using System.Drawing;
using System.Net;
using System.Net.Mail;
using System.Text;
namespace volow
{
public class create_support_ticket
{
MySqlConnection support_sql_connection = null;
MySqlCommand support_sql_command = null;
public void add_support_ticket(string support_incident_title, string email_address, string support_ticket_description)
{
support_sql_connection = new MySqlConnection(ConfigurationManager.ConnectionStrings["SQLdb"].ConnectionString);
support_sql_connection.Open();
support_sql_command = new MySqlCommand("sp_add_support_ticket", support_sql_connection);
support_sql_command.CommandType = CommandType.StoredProcedure;
support_sql_command.Parameters.Add("param_support_incident_title", MySqlDbType.VarChar).Value = support_incident_title;
support_sql_command.Parameters.Add("param_email_address", MySqlDbType.VarChar).Value = email_address;
support_sql_command.Parameters.Add("param_support_ticket_description", MySqlDbType.Text).Value = support_ticket_description;
int result_rows = support_sql_command.ExecuteNonQuery();
support_sql_command.Dispose();
support_sql_connection.Close();
HttpContext.Current.Session["message_title"] = "Thank you";
HttpContext.Current.Session["message_title_Color"] = Color.Blue.ToArgb();
HttpContext.Current.Session["message_text"] = "We have recieved your feedback and we will get back to you as soon as possible.";
HttpContext.Current.Session["message_button_title"] = "Back";
HttpContext.Current.Session["message_button_url"] = "Home.aspx";
if (!HttpContext.Current.Request.Path.EndsWith("Message.aspx", StringComparison.InvariantCultureIgnoreCase))
HttpContext.Current.Response.Redirect("Message.aspx");
}
}
}
and I am calling it from the webform like this:
protected void btnSend_Click(object sender, EventArgs e)
{
if (txtMessage.Text == "")
{
Session["message_title"] = "Error";
Session["message_title_Color"] = Color.Red.ToArgb();
Session["message_text"] = "Please enter your message.";
Session["message_button_title"] = "Back";
Session["message_button_url"] = Request.UrlReferrer.ToString();
}
create_support_ticket create_support_ticket = new create_support_ticket();
create_support_ticket.add_support_ticket(txtSubject.Text, txtEmailAddress.Text, txtMessage.XHTML);
}
but I am getting two rows added for every insert! Thsi first row is correct as per the passed information but the second row adding the Session["message_title"] as support_incdent_title and the Session["message_text"] as support_ticket_description and I really don't know how??
here is my stored procedure:
INSERT INTO support_incidents (support_incident_title, email_address) VALUES (param_support_incident_title, param_email_address);
INSERT INTO support_tickets (support_incident_id, support_ticket_description) VALUES (LAST_INSERT_ID(), param_support_ticket_description);
|
|
|
|
|
You have to wrap the contents of the button function in
If Not Page.IsPostback
'Your function stuff
End If
You'll nave to figure out the c sharp equivalent.
When you click the button, you fire a postback event, so the button code runs twice, runs on postback and runs on the page reloading.
|
|
|
|
|
Hi,
Why I am getting the above error with this code?
protected void btnSend_Click(object sender, EventArgs e)
{
if (txtMessage.Text == "")
{
Session["message_title"] = "Error";
Session["message_title_Color"] = Color.Red.ToArgb();
Session["message_text"] = "Please enter your message.";
Session["message_button_title"] = "Back";
Session["message_button_url"] = Request.UrlReferrer.ToString();
}
create_support_ticket create_support_ticket = new create_support_ticket();
create_support_ticket.add_support_ticket(txtSubject.Text, txtEmailAddress.Text, txtMessage.XHTML);
}
and this is the add_support_ticket:
public void add_support_ticket(string support_incident_title, string email_address, string support_ticket_description)
{
support_sql_connection = new MySqlConnection(ConfigurationManager.ConnectionStrings["SQLdb"].ConnectionString);
support_sql_connection.Open();
support_sql_command = new MySqlCommand("sp_add_support_ticket", support_sql_connection);
support_sql_command.CommandType = CommandType.StoredProcedure;
support_sql_command.Parameters.Add("param_support_incident_title", MySqlDbType.VarChar).Value = support_incident_title;
support_sql_command.Parameters.Add("param_email_address", MySqlDbType.VarChar).Value = email_address;
support_sql_command.Parameters.Add("param_support_ticket_description", MySqlDbType.Text).Value = support_ticket_description;
int result_rows = support_sql_command.ExecuteNonQuery();
support_sql_command.Dispose();
support_sql_connection.Close();
HttpContext.Current.Session["message_title"] = "Thank you";
HttpContext.Current.Session["message_title_Color"] = Color.Blue.ToArgb();
HttpContext.Current.Session["message_text"] = "We have recieved your feedback and we will get back to you as soon as possible.";
HttpContext.Current.Session["message_button_title"] = "Back";
HttpContext.Current.Session["message_button_url"] = "Home.aspx";
HttpContext.Current.Response.Redirect("Message.aspx");
}
|
|
|
|
|
The current page is probably message.aspx, so since the page is doing a postback, your redirecting the page to itself, but it's already going there. It doesn't need to be redirected.
If didn't know you can store a color in a session buffer. I thought session buffers were reserved for primitive types.
Why not just convert the sub to a function and return a integer value of 2, 1 or 0.
0 = success
1 = error
2 = total failure
exitCode integer = addSupportTicket();
switch exitCode {
}
|
|
|
|
|
few days ago i asked a question How to pass dataset to google map api
i dont think that i should have chosen other question rather then this question to be asked but what you suggest which question should i asked?
|
|
|
|
|
hello
I
Do not this example recommend to me,because does not working
https://developer.linkedin.com/thread/1230?start=0&tstart=0
thank you
|
|
|
|
|
Go to the ASP.NET[^] website; you will find lots of samples.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Hi,
You can find many examples from some forums: msdn, w3schools, coderesource, aspdotnet ...
Good Luck!
Comm100 - Leading Live Chat Software Provider
modified 28-May-14 1:49am.
|
|
|
|
|
Hello Everyone,
I'm trying to integrate Paypal Website Payments Standard into my eStore.
I would like to roll my own solution and cannot make sense of the paypal documentation, its very sprawling and there are so many sections that its confusing to say the least.
I'm not intending to use PDT or IPN I will use the RETURN variable to assess if the payment went through okay or failed.
Maybe at a later date I will integrate PDT and IPN too.
I think I can handle the calling and processing the returns.
But I'm stuck at some very basic levels....
1 - Is this a suitable solution for live use? (no PDT/IPN)
2 - Should I calculate discounts or will paypal do it
(using the NVP)
3 - Should I calculate shipping or will paypal do it
(using the NVP)
4 - Should I calculate taxes or will paypal do it
(using the NVP)
5 - What is the order of execution to calculate discounts?
For example.... Is this right?
If CartDiscountAmount > 0 Then
calculate discount based on fixed discount amount
ElseIf CartDiscountRate > 0 Then
calculate discount based on fixed discount rate
Else
calculate discount based on item discount settings
End If
6 - What is the order of execution to calculate shipping?
For example.... Is this right?
If CartShippingAmount > 0 Then
calculate shipping based on fixed shipping amount
ElseIf CartShippingRate > 0 Then
calculate shipping based on fixed shipping rate
Else
calculate shipping based on item shipping settings
End If
7 - What is the order of execution to calculate taxes?
For example.... Is this right?
If CartTaxAmount > 0 Then
calculate taxes based on fixed tax amount
ElseIf CartTaxRate > 0 Then
calculate taxes based on fixed tax rate
Else
calculate taxes based on item tax settings
End If
I have other questions too, but thought i would start at the beginning and ask the other questions as i go along.
I'm not asking for code samples.
I'm asking for pointers to go in the right direction.
Please dont refer me to the paypal website via links.
Thank You.
Well, after having enough of trawling the Paypal documentation I decided to write to their support department, upon completing and submitting my query, I was presented with a popup and links to some other documentation which looked a lot cleaner and more targetted at what I wanted.
So I wrote the function below to update my cart to the paypal processing server.
Please would someone be kind enough to look at it and point out any errors? and also i'm not sure how to process the options field? Any advice or help there would be greatly appreciated.
Structure _IntSuboptionItem
Dim _OptionSelect As String
Dim _OptionAmount As Long
End Structure
Structure _IntOption
Dim _Name As String
Dim _Selection As String
Dim _OptionIndex As Integer
Dim _Suboptions As Generic.List(Of _IntSuboptionItem)
End Structure
Structure _IntOptions
Dim _Options As Generic.List(Of _IntOption)
End Structure
Structure _IntShoppingCartItem
Dim _AmountX As Long
Dim _BlocksX As Integer
Dim _DiscountAmountX As Long
Dim _DiscountAmount2X As Long
Dim _DiscountRateX As Long
Dim _DiscountRate2X As Long
Dim _DiscountNumX As Integer
Dim _ItemNameX As String
Dim _ItemNumberX As String
Dim _QuantityX As Integer
Dim _ShippingX As Long
Dim _Shipping2X As Integer
Dim _TaxX As Long
Dim _TaxRateX As Integer
Dim _UndefinedQuantitXy As Char
Dim _WeightX As Integer
Dim _WeightUnitX As String
Dim _OptionFieldsX As _IntOptions
End Structure
Structure _IntShoppingCart
Dim _Add As String
Dim _Display As String
Dim _Upload As String
Dim _Business As String
Dim _DiscAmountCart As Long
Dim _DiscRateCart As Integer
Dim _HandlingCart As Long
Dim _PaymentAction As String
Dim _ShoppingUrl As String
Dim _Items As Generic.List(Of _IntShoppingCartItem)
End Structure
Function UploadCart(oCart As _IntShoppingCart, strShoppingUrl As String) As Boolean
Dim strReq As String = Nothing
Dim intItmIdx As Integer = Nothing
Dim intCounta As Integer = Nothing
Dim intCountb As Integer = Nothing
Dim intCountc As Integer = Nothing
UploadCart = False
If Trim(oCart._Business) <> "" Then
If ObtainEndpointUrl("nvpapi", "sandbox", "nvp", strReq) Then
strReq = strReq & "?cmd=_cart"
strReq = strReq & "&upload=1"
strReq = strReq & "&business=" & Trim(oCart._Business)
strReq = strReq & "&paymentaction=sale"
strReq = strReq & "&shoppingurl=" & strShoppingUrl
If oCart._Items.Count > 0 Then
For intCounta = 0 To oCart._Items.Count - 1
intItmIdx = intCounta + 1
strReq = strReq & "&item_name_" & intItmIdx & "=" & Trim(oCart._Items(intCounta)._ItemNameX)
strReq = strReq & "&item_number_" & intItmIdx & "=" & Trim(oCart._Items(intCounta)._ItemNameX)
If oCart._Items(intCounta)._QuantityX > 0 Then
strReq = strReq & "&quantity_" & intItmIdx & "=" & Trim(oCart._Items(intCounta)._QuantityX)
Else
strReq = strReq & "&undefinedquantity=1"
End If
If oCart._Items(intCounta)._BlocksX > 0 Then
strReq = strReq & "&amount_" & intItmIdx & "=" & FormatBlockPrice(oCart._Items(intCounta)._BlocksX, oCart._Items(intCounta)._QuantityX, oCart._Items(intCounta)._AmountX)
Else
strReq = strReq & "&amount_" & intItmIdx & "=" & FormatBlockPrice(0, oCart._Items(intCounta)._QuantityX, oCart._Items(intCounta)._AmountX)
End If
If oCart._DiscAmountCart > 0 Then
strReq = strReq & "&discount_amount_cart=" & FormatPrice(oCart._DiscAmountCart)
ElseIf oCart._DiscRateCart > 0 Then
strReq = strReq & "&discount_rate_cart=" & FormatPrice(oCart._DiscRateCart)
Else
If oCart._Items(intCounta)._DiscountAmountX > 0 Then
strReq = strReq & "&discount_amount_" & intItmIdx & "=" & FormatPrice(oCart._Items(intCounta)._DiscountAmountX)
If oCart._Items(intCounta)._DiscountAmount2X > 0 Then strReq = strReq & "&discount_amount2_" & intItmIdx & "=" & FormatPrice(oCart._Items(intCounta)._DiscountAmount2X)
End If
If oCart._Items(intCounta)._DiscountRateX > 0 Then
strReq = strReq & "&discount_rate_" & intItmIdx & "=" & FormatPrice(oCart._Items(intCounta)._DiscountRateX)
If oCart._Items(intCounta)._DiscountRate2X > 0 Then strReq = strReq & "&discount_rate2_" & intItmIdx & "=" & FormatPrice(oCart._Items(intCounta)._DiscountRate2X)
End If
If oCart._Items(intCounta)._DiscountAmount2X > 0 Or oCart._Items(intCounta)._DiscountRate2X > 0 Then strReq = strReq & "&discount_num_" & intItmIdx & "=" & FormatPrice(oCart._Items(intCounta)._DiscountNumX)
End If
If oCart._HandlingCart > 0 Then
strReq = strReq & "&handling_cart=" & FormatPrice(oCart._HandlingCart)
Else
If oCart._Items(intCounta)._ShippingX > 0 Then
strReq = strReq & "&shipping_" & intItmIdx & "=" & FormatPrice(oCart._Items(intCounta)._ShippingX)
If oCart._Items(intCounta)._Shipping2X > 0 Then strReq = strReq & "&shipping2_" & intItmIdx & "=" & FormatPrice(oCart._Items(intCounta)._Shipping2X)
End If
End If
If oCart._Items(intCounta)._TaxX > 0 Then
strReq = strReq & "&tax_" & intItmIdx & "=" & FormatPrice(oCart._Items(intCounta)._TaxX)
ElseIf oCart._Items(intCounta)._TaxRateX > 0 Then
strReq = strReq & "&tax_rate_" & intItmIdx & "=" & FormatBlockPrice(oCart._Items(intCounta)._BlocksX, oCart._Items(intCounta)._QuantityX, oCart._Items(intCounta)._TaxRateX)
End If
If oCart._Items(intCounta)._WeightX > 0 Then
strReq = strReq & "&weight_" & intItmIdx & "=" & FormatPrice(oCart._Items(intCounta)._WeightX)
If Trim(LCase(oCart._Items(intCounta)._WeightUnitX)) = "kgs" Then
strReq = strReq & "&weight_unit_" & intItmIdx & "=kgs"
Else
strReq = strReq & "&weight_unit_" & intItmIdx & "=lbs"
End If
End If
If oCart._Items(intCounta)._OptionFieldsX._Options.Count > 0 Then
For intCountb = 0 To oCart._Items(intCounta)._OptionFieldsX._Options.Count - 1
strReq = strReq & "&on" & intCounta & "_" & intCountb & "=" & Trim(oCart._Items(intCounta)._OptionFieldsX._Options(intCountb)._Name)
For intCountc = 0 To oCart._Items(intCounta)._OptionFieldsX._Options(intCountb)._Suboptions.Count - 1
Next
Next
End If
Next
End If
Else
End If
Else
End If
intCounta = Nothing
intCountb = Nothing
intCountc = Nothing
intItmIdx = Nothing
strReq = Nothing
End Function
Private Function FormatBlockPrice(intBlocks As Integer, intQuantity As Integer, lngValue As Long) As String
FormatBlockPrice = "0.00"
If intBlocks > 0 Then
If intQuantity > 1 Then
FormatBlockPrice = FormatPrice((intQuantity * lngValue) * intBlocks)
ElseIf intQuantity = 1 Then
FormatBlockPrice = FormatPrice(lngValue * intBlocks)
End If
Else
If intQuantity > 1 Then
FormatBlockPrice = FormatPrice(intQuantity * lngValue)
ElseIf intQuantity = 1 Then
FormatBlockPrice = FormatPrice(lngValue)
End If
End If
End Function
Private Function FormatPrice(lngValue As Long) As String
FormatPrice = "0.00"
If lngValue > 0 Then FormatPrice = FormatNumber(lngValue, 2, TriState.True)
End Function
Private Function ObtainEndpointUrl(strAuthentication As String, strEnvironment As String, strFormat As String, ByRef strRtnEndpoint As String) As Boolean
strRtnEndpoint = ""
ObtainEndpointUrl = False
Select Case strAuthentication
Case "apicertificate"
If strEnvironment = "live" Then
If strFormat = "soap" Then
strRtnEndpoint = "https://api.paypal.com/2.0/"
Else
strRtnEndpoint = "https://api.paypal.com/nvp"
End If
Else
If strFormat = "soap" Then
strRtnEndpoint = "https://api.sandbox.paypal.com/2.0/"
Else
strRtnEndpoint = "https://api.sandbox.paypal.com/nvp"
End If
End If
Case "adaptiveapis"
If strEnvironment = "live" Then
strRtnEndpoint = "https://svcs.paypal.com/AdaptivePayments/API_operation"
Else
strRtnEndpoint = "https://svcs.sandbox.paypal.com/AdaptivePayments/API_operation"
End If
Case "permissionsapis"
If strEnvironment = "live" Then
strRtnEndpoint = "https://svcs.paypal.com/Permission/API_operation"
Else
strRtnEndpoint = "https://svcs.sandbox.paypal.com/Permission/API_operation"
End If
Case Else
If strEnvironment = "live" Then
If strFormat = "soap" Then
strRtnEndpoint = "https://api-3t.paypal.com/2.0/"
Else
strRtnEndpoint = "https://api-3t.paypal.com/nvp"
End If
Else
If strFormat = "soap" Then
strRtnEndpoint = "https://api-3t.sandbox.paypal.com/2.0/"
Else
strRtnEndpoint = "https://api-3t.sandbox.paypal.com/nvp"
End If
End If
End Select
ObtainEndpointUrl = (Trim(strRtnEndpoint) <> "")
End Function
modified 23-Nov-12 5:48am.
|
|
|
|
|
Well NVP stands for Named Value Pair, in which you send "Name=Jim" as a NVP
Credit card processing can be separated into these categories
AUTH_ONLY
AUTH_CAPTURE
TIPS or MANUAL CHARGE
BATCH CAPTURE
VOID
PARTIAL CREDIT
CREDIT
GET BALANCE
So you have to AUTH FIRST, then CAPTURE.GET BALANCE is for gift cards. The rest are back end functions, But remember, you always have to capture at some point, like the end of the day.
1. I don't see the purpose for IPN. If a customer has a dispute, they call you first. Why would I want a IPN to tell me they disputed the charge, it should never go there in the first place.
2,3,4,5,6,7
I can't see how PayPal can accurately calculate shipping, sales tax and discounts.
Shipping:
Shipping is based in dimensional and gravitational weight of about 160 lbs and girth of 165. Girth (2x Width + 2x Height)
Sales Tax
Each state is different, in California, services are tax free, the state is about 7.0%, my county is .75% for 7.75%. Shipping is non taxable.
Discounts
Discounts always come off the subtotal before tax and shipping
Overview
Well from looking at your code, you seem to be a confident programmer. But take no offense, with all due respect, you seem to have no clue about running a store or a small business, and do not realize how large the scope of calculating Sales tax, shipping and discounts are. There are basic formulas, but someone has to assign the values for every item in the store first in order to calculate them, unless you only sell 1 product. Now you have 48 states, and Alaska and Hawaii which is minimum 2 day air at about $15 to $23 dollars for about 2 pounds and 25 inches of girth.
PayPal is a terrible service to use, and very expensive. If I as a store owner was told I have to use PayPal for my online store, because the programmer told me so, I would laugh. I'm not paying $25 a month plus $3.25 for a AVS lookup, and I think plus 3.7% total for each transaction, plus .25 each per batch capture. If its American Express, Add $5 per month more for $30 a month, plus 3 more points minimum.
Consider having the customer qualify for a merchant processor account first, and that the website you made meets the minimum requirement for approval first. Then select a payment gateway from the available choices.
I wrote this article years ago on payment gateways and merchants processors. I may port it over to a code project tutorial in the future if they let me.
[How to choose a payment gateway^]
|
|
|
|
|
Hello jkirkerx,
Thank you for taking the time and effort to write a considerable amount of detailed information, its greatly appreciated.
I was devloping the project for myself, and chose paypal because it states that there are no charges for website payments standard except the transactional charges which as you rightly stated are approximately 3 to 4 percent of the total value of the transactionand the most expensive product is under £25 (GBP).
Still, you've given me lots to think about and possibly even seek a readymade cart to implement, although I was really looking to cut costs and hence thats why I opted to have a go at developing a solution to my problem myself.
The issue to do with shipping is definately a major one (for me) as shipping costs vary for shipping to different countries as you so rightly stated.
The reason I opted for paypal was because so many people already have a paypal account (which they use with ebay).
Thank you very much for your input and its made me go back to the drawing board to re-asses everything.
|
|
|
|
|
PayPal was the 2nd Payment Gateway I wrote in 2003, first was Verisign, both were CIM. Then I wrote my first real AIM Module for Authorize.net, and wrote AIM ever since. I have potential customers that want CIM, so they don't have to get a SSL certificate.
As far as the EBay factor goes, Magneto seems to be doing a good job at taking the EBay customers. EBay pumped money into them 5 years ago, and then bought the company with their Skype Money. Magneto was smart and charges about $2500 US a year to use the program, they have a lite version that's free to use, but very limited.
Calculating shipping was the hardest program I have ever written. It took me 3 years to figure out how to add up all the mass, and divide it into package units, or pallet units, and then submit each package in a loop for a single quote. I've been running the shipping module for 3 years now, and have got the accuracy up to 99%, always a bit over the actual cost.
So I have this eCommerce program, been working on it for 5 years now, and it's almost ready for mass marketing. I want to change the name of it first and trademark it. I have a few more things to fix like the multi-threaded email delivery system.
I was going to port my program over for European Use, but I don't live in Europe, and I have no clue about shipping companies, payment processors and what languages I need to support.
Let me know what you decide to do. I'm curious to see where the path of least resistance takes you.
|
|
|
|
|
Hiya jkirkerx,
I can appreciate that shipping calculation is complex, yet I was under the understanding that the best option to calculate shipping was to take the most common shipping companies ie UPS and DHL (to name two) located within the geographical areas of the sellers and then possibly to register with them for updates on price changes or to write a script that would crawl their website pages (the pages contaning the fee's) and them to save those details in an sql table or xmlrepository and use those figures based uponthe buyers selction of preferred couriers/shipping agents.
Having said that, I must admit I'm not that up on IT and developing having never gone to college or university for formal training. Whatever limited knowledge i have i have gained from hme study after work hours (when employed) or during freetime, from books purchased in the highstreet stores. I must admit I like the mental stimulation of having a problem and trying to resolve it by coming up with your own solution.
I must also admit my solutions arnt always the best hahaha, though I do try. Generally as can be expected I feel the best route is usually the tried and tested text book method, though sometimes its mind-bending to say the least, and now i'm getting older (47) the old brain isnt what it used to be!
As you so rightly stated in your last post, ultimately someone somewhere has to enter the data into the SQL repository (usually the seller i would assume). Alternatively the seller could choose from a predetermined list of shipping charges based uponthe couriers (DHL UPS etc).
As for languages, I'm not very sure but assume that the no one language is universally spoken in all of europe, your bound to find a largeamount of people who dont speak a given language and that the MOST common ones (to my knowledge) are English, German, French and Spanish. I would think if you cover those four then you have close to 70%-90% of the bases covered.
From the way you talk I have no doubt your knowledge of prgramming/devloping is far superior to mine and no offence was taken in your last post where you stated the obvious (that i have no idea of the complexities of shipping etc).
As for letting you knwo which option I choose, I'm still undecided, and unsure what to do next. This is mainly factored to funding being unemployed and (hopefully) between jobs though I dont want to get my hopes high hahaha.
My initial thoughts were that the seller would enter the shipping rates for shipping his/her/their goods to the buyer in a similar fashion to ebay and therfore releasing me from the tedious issue.
I chose website payments standard because its free to begin with apart from the transactional fee's which in all honesty is more or less an everyday thing, what with the way Pay as Go for everything is available now including cable tv and mobile phone coverage and even car insurance can be bought on a daily only basis (though i would imagine its quiet expensive)
I'm still chewing over what route to take, the easiest way out is to obviously purchase a third party product and implement that but its not something i can afford i should imagine.
EDIT:
I guess in the meantime i will keep trawling the net to find a sample that even idiots can implement hahaha
|
|
|
|
|
In totl i got total price but i am not able to display it... Loop is not go in Else Loop.............
<asp:ListView ID="lstViewCart_History" runat="server" OnPreRender="lstViewCart_History_PreRender" OnItemDataBound="lstViewCart_History_OnItemDataBound" ItemPlaceholderID="PlaceHolder1">
<LayoutTemplate>
<table width="40%">
<thead>
<tr>
<td>
<%# Eval("order_pid")%>
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</thead>
<tbody>
<asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>
</tbody>
<tr>
<td colspan="8" align="right">
Total Amount
</td>
<td colspan="2" align="left"><br />
$<asp:Label ID="lblw" runat="server" Text=""></asp:Label>
</td>
</tr>
</table>
</LayoutTemplate>
<ItemTemplate>
<table>
<tr>
<td>
<table>
<tr>
<td>
Book Name
</td>
<td>
Author
</td>
<td>
ISBN
</td>
<td>
Order Number
</td>
<td>
Order Date
</td>
<td>
Quantity
</td>
<td>
Price
</td>
<td>
Total Price
</td>
</tr>
<tr>
<td>
<%# Eval("cartdetail_pname")%>
</td>
<td>
<%# Eval("cartdetail_author")%>
</td>
<td>
<%# Eval("cartdetail_isbn")%>
</td>
<td>
<%# Eval("order_pid")%>
</td>
<td>
<%# Eval("order_date")%>
</td>
<td>
<%# Eval("cartdetail_qty")%>
</td>
<td>
$<%# Eval("cartdetail_price")%>
</td>
<td>
$<asp:Label runat="server" ID="total_price" Text='<%#Eval("total_price")%>'></asp:Label>
</td>
</tr>
</table>
</td>
</tr>
</table>
</ItemTemplate>
</asp:ListView>
protected void lstViewCart_PreRender(object sender, EventArgs e)
{
Label lblTot = this.ListView1.FindControl("lblGrandTotal") as Label;
if (lblTot == null)
{
}
else
{
lblTot.Text = totl.ToString();
}
}
Thanks for giving time to read my problem and also for your valuable suggestions.
Gaurav Bhandari
|
|
|
|
|
Put this code in ItemDatabound event. first check item type then put that code.
if(e.Item.ItemType = ListViewItemType.DataItem )
{
Label lblTot = this.ListView1.FindControl("lblGrandTotal") as Label;
if (lblTot != null)
{
lblTot.Text = totl.ToString();
}
Parwej Ahamad
|
|
|
|
|
I don't see lblGrandTotal label in the DOM??
|
|
|
|
|
Your given HTML doesn't contains that label. So where you placed that label, inside the listview or outside?
Parwej Ahamad
|
|
|
|
|