|
im using vb. To summarize, i have a textbox where user input quantity and a gridview to display the price. i also have a submit button to calculate the totalprice where totalprice = quantity * price.
meanwhile im using a label to store the value price.
<br />
Dim tmp As Double = e.Row.Cells(3).Text.Trim<br />
Label1.Text = "$" + (tmp).ToString("0.00")<br />
this is the submit coding
<br />
myCommand.CommandText = "INSERT INTO [Order] ([Quantity], [TotalPrice]) VALUES ('" & CStr(Me.txtQty.Text) & "',__________)"<br />
<br />
is ________ me.txtQty * Label.Text ?? i need to know what should be the correct way.<br />
<br />
<br />
<br />
thanks in advance. Much appreciated.
|
|
|
|
|
Plz try this
cdbl(me.txtQty.text) * cdbl(Label.Text )
or
cint(me.txtqty.text) * cint(Lable.Text)
Your access database column type should be integer, Float or Double....
Quantity,TotalPrice.
Better way.........
dim Total as integer = cint(me.txtqty.text) * cint(Lable.Text)
"Insert Into order (quantity,TotalPrice) Values (" & me.txtQty.Text & "," & cstr(Total) & ")"
Parwej Back...............DON of Developer.......
Parwej Ahamad
g_parwez@rediffmail.com
|
|
|
|
|
thanks but there was an error
No value given for one or more required parameters.
Dim Total As Integer = CInt(Me.txtQty.Text) * CInt(Label1.Text)<br />
myCommand.CommandText = "INSERT INTO [Ord] ([Quantity], [TotalPrice]) VALUES ('" & CStr(0) & "','" & CStr(Total) & "')"
i change my databse for TotalPrice to number instead of currency.
thanks in advance. Much appreciated.
|
|
|
|
|
The error message means that you have one or more names in the query that doesn't match the database. Check the name of the table and the names of the fields.
If the fields are numeric, you should not use apostrophes around the values, as that makes them string values.
Why are you storing the total price in the database anyway? If you display the data later, don't you want to display both the price and the total price? You can always calculate the total price if you store the price and the quantity, but if you store the total price and quantity you have to re-create the price, which is a bit backwards.
---
Year happy = new Year(2007);
|
|
|
|
|
in detail, i have two tables, 1 is products details and the other is order details.
so the totalprice n quantity are meant for the order details table.
so how should i solve the problem? both the field names are spelled correctly.
thanks in advance. Much appreciated.
|
|
|
|
|
blurMember wrote: in detail, i have two tables, 1 is products details and the other is order details.
so the totalprice n quantity are meant for the order details table.
I see. You might consider copying the price from the products table to the order table at the time of the order, so that the orders doesn't change if the product changes.
blurMember wrote: both the field names are spelled correctly.
The database begs to differ...
Debug the application and look at the query that you created, so that you see if it ended up the way that you expect.
---
Year happy = new Year(2007);
|
|
|
|
|
hi every one,
i am trying to get code for this project, i hav to submit in the college,
is there any one can help me to find this or give me the link or if any one can
able write, please write it for me.
thanks very much
this is abstract:
Project Title : TRADING PARTENERS COLLABORATION
ABSTRACT
The Trading Partners Collaboration application is a web-based application for primarily providing Services to Companies who hire Consultants from vendors/suppliers. The main aim of this application is to Reduce Administrative costs by automating the workflow (via Web) taking place between the people on the Company-side and the people on the vendor-side and the hired Consultants.
This Application is useful for preparing the timesheets, which are entered by the consultants. Time sheet consists of company and project details and for each task like coding, design, testing, and documentation etc, the number of hours they worked throughout the week.Consultant having the permission to enter the time sheet. Also can check different types of reports based on project or client wise. These entered Time sheets can be approved or rejected by the manager (approver).this approving the time sheets is done by manager at the end of week by selecting option called week ending dates. At the manager’s login there are reports based on different search criteria. To maintain the details of users, projects, consultants, permission to login users and define the new roles can be done at administrative tasks. This application is maintaining three types of logins consultant, manager and administrator. Consultant can act as timesheet entry or expense sheet entry. Manager role is to approve the time sheet or expense sheet. And admin maintain all the details of consultants, managers, projects and roles. This reduces administrative costs for the company side.
aslam
|
|
|
|
|
aslamshaik2510978 wrote: i am trying to get code for this project, i hav to submit in the college,
is there any one can help me to find this or give me the link or if any one can
able write, please write it for me.
I think the idea is that you write it.
|
|
|
|
|
aslamshaik2510978 wrote: please write it for me.
I suggest you either change your attitude, or drop out of your course now.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
can any one able to help me plz, it shows error in web.configfile,
when i run project , it says unable to start debugging on web server,access is denied.
then i run start without debuging. it shows an error in web.config
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Unrecognized tag 'Forms' in the config file
Source Error:
Line 37: -->
Line 38:
Line 39: <forms loginurl="login1.aspx">
Line 40:
Line 41:
Source File: c:\inetpub\wwwroot\internetdbmailsystem\web.config Line: 39
this is my config file
<authentication mode="Forms">
<forms loginurl="login1.aspx">
<credentials passwordformat="Clear">
<user name="aslam" password="basha">
<user name="basha" password="aslam">
<authorization>
<allow users="aslam">
<deny users="*">
|
|
|
|
|
for this error 'unable to start debugging on web server,access is denied'
see whether ur name is the part of the debuggers users in the iis. and one more thing the debug = true option should be set in the web.config file. the tag is not recognized by the envt.
for this error
'<Forms loginurl="login1.aspx">
u set this code n check out
<authentication mode="Forms">
<Forms loginurl="login1.aspx"></Forms>
</authentication>
|
|
|
|
|
can any one able to help me plz, it shows error in web.configfile,
when i run project , it says unable to start debugging on web server,access is denied.
then i run start without debuging. it shows an error in web.config
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Unrecognized tag 'Forms' in the config file
Source Error:
Line 37: -->
Line 38: <authentication mode="Forms">
Line 39: <forms loginurl="login1.aspx">
Line 40: <credentials passwordformat="Clear">
Line 41: <user name="aslam" password="basha">
Source File: c:\inetpub\wwwroot\internetdbmailsystem\web.config Line: 39
aslam
|
|
|
|
|
for this error 'unable to start debugging on web server,access is denied'
see whether ur name is the part of the debuggers users in the iis. and one more thing the debug = true option should be set in the web.config file. the tag is not recognized by the envt.
for this error
'<Forms loginurl="login1.aspx">
u set this code n check out
<authentication mode="Forms">
<Forms loginurl="login1.aspx"></Forms>
</authentication>
|
|
|
|
|
how can i make a rollover menu that shows submenus when rolled over - like the green top right menu here on codeproject.com - when rolling over the "Message Board" menu for example it opens the submenus (windows vista,visual C++,Alt/WTL/STL,COM,C++ etc.).is it possile with Dreamweaver? or generally what code should i write.
tx.
|
|
|
|
|
This is the ASP.NET forum. It's probably possible in DreamWeaver, I don't know. The web dev forum is the place to ask.
It's certainly possible using javascript.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
hi there
can i save reference type in Application Object In Asp.Net???
i Know application in asp.net work on single thread so the problem is
when a few users (concurrent) request together a web page
then the application will serve 1 by 1 and Manage queue for all user?
So My Question is when i will use Refernce type in Application Object???
thanks in advance
|
|
|
|
|
ronivars wrote: can i save reference type in Application Object In Asp.Net?
Yes.
ronivars wrote: i Know application in asp.net work on single thread
No, it doesn't.
ronivars wrote: when a few users (concurrent) request together a web page
then the application will serve 1 by 1 and Manage queue for all user?
No, they will run side by side in separate threads.
ronivars wrote: when i will use Refernce type in Application Object?
Whenever you store an object in the Application object. If you for example store a string in the Application object, you actually store the reference to the string.
---
Year happy = new Year(2007);
|
|
|
|
|
hi guffa thanks for quick answer
i find some explanasion for HttpApplication class in msdn:
Instances of the HttpApplication class are created in the ASP.NET infrastructure, not by the user directly. One instance of the HttpApplication class is used to process many requests in its lifetime; however, it can process only one request at a time. Thus, member variables can be used to store per-request data.
so i need to improve Existing web application and a lot of object created
in my company store in application object that influencing performance
when concurrent users try to request pages
let's say for example data access(DAL) object is store in httpApplication
it's serve only one request at a time if i have 10 users concurrent thay will
angry
and one more thing in msdn
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
thanks again i be happy for suggestion
roni vars
|
|
|
|
|
ronivars wrote: so i need to improve Existing web application and a lot of object created
in my company store in application object that influencing performance
when concurrent users try to request pages
let's say for example data access(DAL) object is store in httpApplication
it's serve only one request at a time if i have 10 users concurrent thay will
angry
I only have a vague idea what you are trying to say here... You have to divide what you write into sentences, or it's practically impossible to decipher.
If each HttpApplication object only serves one request at a time, that means that each worker thread in the application has it's own HttpApplication object. That in turn means that if you store anything in the HttpApplication object, it will only be available from that worker thread.
If you cache DAL objects in the HttpApplication object, they will be local to the worker thread, which is very bad for cached objects. If you have for example ten worker threads, you will have ten copies of the cache in memory. That is bad, but nothing compared to the mess you can get if you update the data in the database and update the cache in the current thread accordingly. Then you have inconsistent data across threads, which will lead to users seeing old data and writing over each others changes.
If you want to share data in the application, you should store it in the HttpApplicationState object instead of in the HttpApplication object. You can use the Lock and Unlock methods of the HttpApplicationState object to make sure that only one thread at a time has access to it when you update values.
---
Year happy = new Year(2007);
|
|
|
|
|
hi Guffa thank for help
Now i Understand how apllication Work in depth
thanks Again
if Somebody wan't to understand how Application Work:
http://msdn.microsoft.com/msdnmag/issues/03/06/Threading/#S9
roni vars
|
|
|
|
|
hi again guffa,
the DAL problem is just for example,
is it true to say every request have one worker thread?
thanks
roni vars
|
|
|
|
|
ronivars wrote: is it true to say every request have one worker thread?
Yes. The worker thread is only unique to the request while the request is handled, though. After the request is handled, the worker thread will be returned to the pool and reused for other requests in the future.
---
Year happy = new Year(2007);
|
|
|
|
|
C# is the code behind lang.
What I want to do is display an image and then have some text describing the image float/display around the image. I used a System.Web.UI.WebControls.Image control on the page. The text and URL for the image will be pulled from a database when the page loads. I have that part all figured out. The question is how do I float the text around (not on top) the image like I can do in MS Word.
I did try to search the articles because I know I am not the first person with this question, so if I missed it, please refer me to it.
Thanks for all your help.
Patrick
|
|
|
|
|
This is a web development question rather than an ASP.NET question, as the solution is in HTML and CSS.
Make the image a floating element, and the text will float around it. Example:
<p><img src="..." style="float:left">The image will be placed at the left side, and this text will float to the right of the image.</p>
---
Year happy = new Year(2007);
|
|
|
|
|
Thanks. The asp part is "How do I get the text from the c# code (which I retrieved from the database) to the html page?" That is what is really confusing me? I tried calling a <%# GetText() %> but that did not work.
Thanks so much for your help.
patrick
|
|
|
|