|
Hello all,
I am creating a point of sale application but I have an issue that I have a page in which I want to show the Product Items and on the same page I want to display the cart.I have done this by using the frame set but the issue is whenever I have added a new item it doesn't show on a cart untill I refresh the whole page.I think I have to use update panel through AJAX.But how could I apply this or any other solution could any one suggest please help me.
|
|
|
|
|
That how it works. The page has to send a request to the server to get new HTML that represents the current data stored.
The update panel just puts round trips to the server into a smaller container, so your still doing a postback, but just a partial page postback. The update panels works fine in developement, but in production mode, as you get farther away from the server in distance (4K miles away), the speed slows down, and the page gets jerky and stutters. The update panels is sensitive to data changes, with the exception of the textbox and dropdown box selected values, in which it has security features that do not accept changes. So if the server sent one thing, and another posted back, a security exception will be thrown.
You would have to use Javascript and a webservice, in which the client keeps polling for cart data, and the javascript updates the cart container, or have some type of trigger that fires off the process.
Or just change the user experience, by sending them to a confirmation page, and then send then back to the origin page. When they come back, everything is updated.
|
|
|
|
|
Hi,
I'm trying to connect to this Remote Web Service
http://217.52.114.3/kannelsending/service.asmx?op=SendSMS[^]
When I try it manually, it works, I have a username and password.
But it displays this error:
The remote server returned an error: (500) Internal Server Error.
...at this line.
HttpWebResponse myResp = (HttpWebResponse)myReq.GetResponse();
Do I need to encrypt the parameters or what? I'm kinda new to webservices...
Am I missing something..can someone post an example to try out?
Thanks.
|
|
|
|
|
Normally, you'd generate a set of service proxy classes to handle the communication to the server. Working at the Http level/rolling your own messages is normally tiresome and needless, thankfully there is a wsdl defining the service you want to use.
I'd suggest running wsdl.exe against http://217.52.114.3/kannelsending/service.asmx?WSDL[^], this will generate a set of proxy classes you can consume in your code.
You can also add a reference to the web service by right-clicking the project --> add service reference and using http://217.52.114.3/kannelsending/service.asmx as the service address. Don't know how well it works with external IPs, and if anything changes with the external service, it could break your code.
Refs here:
http://msdn.microsoft.com/en-us/library/ms155134.aspx[^]
|
|
|
|
|
What version of .NET framework are you using? If you are using v4.0 you can add a service reference which would make it simple or you can search the .ServiceModel for easy tools.
|
|
|
|
|
[Edit]
I went to your link, and the typical methods for accessing the web service came up.
The last example is probably what your looking for.
You'll probably have to debug the web service to see if the query strings are taken first, and make adjustments. Just load the web service file, and press F9 to mark a spot to stop at and press F5.
HTTP POST
The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.
POST /kannelsending/service.asmx/SendSMS HTTP/1.1
Host: 217.52.114.3
Content-Type: application/x-www-form-urlencoded
Content-Length: length
service.asmx?UserName=string&Password=string&SMSText=string&SMSLang=string&SMSSender=string&SMSReceiver=string
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<int xmlns="http://tempuri.org/">int
modified 4-Nov-12 1:30am.
|
|
|
|
|
actually i am developing a web application ..in that web application i have lot of label controls ,buttons and textbox placed in the top of the page.in the bottom of the page i placed a gridview control..when i click the view button the top of the controls like textbox and labels will be disabled and gridview is placed at the top of the page..but for the gridview is displayed bottom page only...can anyone help me how to view the gridview control in the top of the page....thanks in advance
|
|
|
|
|
Do you want to hide the controls and show the grid view.
Or You want to show the grid view as the popup window.
|
|
|
|
|
i have a lot of controls in a webpage like buttons labels and textbox,,,and in the bottom page i kept one grid view..while in run time i kept hide the gridview during the page load,if the button view is clicked,i want to disable the textboxes and labels and buttons which i kept in the top page,and replace that in gridview controls..i did it but gridview is displayed in bottom page only,,it will appear in the top of the page..can u pls help
|
|
|
|
|
Wrap all of the controls at the top in one div and the grid in another. Use a bit of javascript to hide the top div and move the lower up to the top is one way to do it.
You could also use an asp:Panel to surround each and set the visibility of the top one to false on PostBack.
I'm sure there are other ways to do this but these should get you going.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
You can place the grid into one div tag
and specify the position: absolute and specify the location where do you want to display the grid.
and make the div visible true false on the basis of the requirement
|
|
|
|
|
what is different between DataAdapter.Update() and Dataset AcceptChange() in ADO.Net??
|
|
|
|
|
AcceptChanges is used to update the dataset while Update method is used to update the database.
The Update method of the DataAdapter is called to resolve changes from a DataSet back to the data source. The Update method, like the Fill method, takes as arguments an instance of a DataSet, and an optional DataTable object or DataTable name. The DataSet instance is the DataSet that contains the changes that have been made, and the DataTable identifies the table from which to retrieve the changes.
Whereas
Calling AcceptChanges on the DataSet, DataTable, or DataRow causes all Original values for a DataRow to be overwritten with the Current values for the DataRow. If the field values that identify the row as unique have been modified, after calling AcceptChanges the Original values will no longer match the values in the data source. AcceptChanges is called automatically for each row during a call to the Update method of a DataAdapter.
Details here: MSDN: Updating Data Sources with DataAdapters[^]
|
|
|
|
|
Needed help inorder to implement a component that facilitates SFTP in .NET.A normal FTP component can be implemented using in-built .NET Libraries.
Alesha Mary Milred Fernandes
|
|
|
|
|
It does not work like this here. You need to share what have you tried so far and where are you stuck - be specific.
For now, look at this discussion thread: SFTP with .net 3.5?[^] - try out.
|
|
|
|
|
i am using open xml in .net 4.0
i want to copy the data contain in one sheet in one work book and paste into sheet different work book with sheet name, i have done this by using miscrosoft.interop.excel, i want same thing using open xml please give the solution
i have done this by using miscrosoft.interop.excel this is the following code the same thing need to be done using openxml please help me on this
Excel.Application oXL;
Excel.Workbook oWB;
Excel.Worksheet oSheet;
Excel.Range oRange;
oXL = new Excel.Application();
// // Set some properties
oXL.Visible = true;
oXL.DisplayAlerts = false
for (int iWorkbook = 0; iWorkbook < Files.Length; iWorkbook++)
{
if (Files[iWorkbook] != string.Empty)
{
oXL.Workbooks.Add(Files[iWorkbook]);
}
}
for (int i = 2; i <= oXL.Workbooks.Count; i++)
{
int count = oXL.Workbooks[i].Worksheets.Count;
oXL.Workbooks[i].Activate();
for (int j = 2; j <= count; j++)
{
Excel._Worksheet ws = (Excel._Worksheet)oXL.Workbooks[i].Worksheets[j];
ws.Select(Type.Missing);
ws.Cells.Select();
string name = ws.Name;
Excel.Range sel = (Excel.Range)oXL.Selection;
if (sel.Cells.Text != string.Empty)
{
sel.Copy(Type.Missing);
Excel._Worksheet sheet = (Excel._Worksheet)oXL.Workbooks[1].Worksheets.Add(
Type.Missing, Type.Missing, Type.Missing, Type.Missing
);
sheet.Paste(Type.Missing, Type.Missing);
sheet.Name = name;
}
}
}
string[] ConsolidatedFiles = Directory.GetFiles(filepath);
if (ConsolidatedFiles.Length > 0)
{
string filetemplates = filepath + "\\" + TemplateType + ".xlsx";
for (int file = 0; file < ConsolidatedFiles.Length; file++)
{
if (ConsolidatedFiles[file].ToString() == filetemplates)
{
File.Delete(ConsolidatedFiles[file]);
}
}
}
filepath = filepath + "\\" + TemplateType + ".xlsx";
oWB.SaveAs(filepath, Excel.XlFileFormat.xlWorkbookDefault,
Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Excel.XlSaveAsAccessMode.xlExclusive,
Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing);
oWB.Close(Type.Missing, Type.Missing, Type.Missing);
oWB = null;
oXL.Quit();
|
|
|
|
|
how to design a master page in asp.net and what is use of mater page ..
|
|
|
|
|
I think the following article will give you all the information needed to get started with master pages.
Beginner's Tutorial on Master Pages in ASP.NET[^]
Every now and then say, "What the Elephant." "What the Elephant" gives you freedom. Freedom brings opportunity. Opportunity makes your future.
|
|
|
|
|
I use masterpages all the time, every project
I start with the landing masterpage first. Build the HTML framework, add a Landing CSS Sheet with master layout, then add content placeholders for head content, body content, sitemap content, and test it across all browsers. Then I dial in the artwork, the color palettes to be used (usually about 6 colors that are harmonic), the menu systems, and test and test and test.
I usually spend about 2 days on the landing masterpage, then I make a copy of it, for other masterpages, and tweak the designs a bit. I'll make a copy that has a 2/3 1/3 column layout, one for a 1/1 layout, 1/4 3/4 layout for left side menu and content, and give them names that represent the languadge and layout.
You can globalize masterpages, one for English, one for French, etc.
Once your masterpages are perfect, it's easy to start building pages after that, but you have to have all your masterpages built first, or else it slows down your workflow process.
The masterpage is like a container, in the old days, you had to put the master page container content on every page, and you would lose track of the start and stop points of it. If you wanted to make a change to the master content, you had to do it on every page.
In classic asp, we made a header and footer HTML file, to contain master content. and you had to do an include for every page.
Once you get it down, you won't turn back to the old ways.
|
|
|
|
|
Start here.[^]
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
i think start from "hello word" beginning ^_^
|
|
|
|
|
Hi,
I am hosting on a remote host somewhere in US.
I have a folder with sub folders inside it. The folder name is : member
I want when creating a new member to copy the folder and all its subfolder to a new folder called xxx
both member folders and xxx folder are in ~/images/
how can I do this?
Thanks,
|
|
|
|
|
I tried this but not working:
string path = "~/images/" + "TTTTTTT";
DirectoryInfo directoryInfo = new DirectoryInfo(Server.MapPath(path));
if (!directoryInfo.Exists)
{ directoryInfo.Create(); }
I am not getting any error but directory is not getting created either!
|
|
|
|
|
Can you have a logger to log the 'path' like this
logger.Debug(path) in both if and else routes?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
I decided to use Oracle 11.g for a new website job I sold that sells chips.
A small project to experiment with Oracle, and see how good it works, what's up with it, it is better than SQL Server 2008
I figured out most of the stuff, got the databases, tablespaces, permissions going.
Having trouble understanding parameters, and using the OracleDataReader in asp.net, and I'm not quite sure if I used the OracleConnection and OracleCommand correctly.
1. Specified cast is not valid. I know what it means, but I'm trying to figure out a different way of expressing it below.
p_Count = oReader.GetInt32(0) 'TheCount
2. Using the Parameters, I think Oracle doesn't like the @ char in the parameter name.
I want to say "SELECT COUNT(*) FROM WWW.RC$_PRODUCTINDEX WHERE MANUFACTURE=@MANUFACTURE"
But I get a error - ORA-00936: missing expression
Anyways, I was just looking for some pointers, or just a different set of eyes on my code, most of stuff I found was for data binding.
Dim p_Count As Integer = 0
Dim conStr As String = "Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DellC521-01.redcopper.local)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=XE)));User Id=WWW;Password=UTF888888"
Dim cmdQuery As String = "SELECT COUNT(*) FROM WWW.RC$_PRODUCTINDEX"
Dim con As New OracleConnection(conStr)
Dim cmd As New OracleCommand(cmdQuery)
cmd.Connection = con
cmd.CommandType = Data.CommandType.Text
Dim param_MANUFACTURER As OracleParameter
param_MANUFACTURER = New OracleParameter("@MANUFACTURER", OracleDbType.Varchar2, 80)
param_MANUFACTURER.Value = m_Manufacturer
cmd.Parameters.Add(param_MANUFACTURER)
Try
con.Open()
Dim oReader As OracleDataReader = cmd.ExecuteReader
While oReader.Read()
p_Count = oReader.GetInt32(0) 'TheCount
End While
oReader.Close()
con.Close()
oReader = Nothing
Catch ex As Exception
End Try
con = Nothing
cmd = Nothing
Return p_Count
|
|
|
|
|