2 decimal places

Hi again yet another question

 

I am trying to divide two variables and * by a hundred to get a percentage.

the two variables are doubles (Which I thought would give me my decimal)

private wordCount as double = 0.0         

private matchCount as double = 0.0

------------------------------------

 if matchCount > 0 then
  dim anchor as string = "<a href=index3.aspx?QuestionID=" & Question_ID & "&Question=" & questionin & "&Answer=" & Answer & "&CategoryID=" & Category_ID & ">" & questionin & "</a> "
  response.write("-----------------Start of percentage work out-----------------------------<br>")
  percentageMatch = (( matchCount \ wordCount)  * 100)     'Work out the percentage hit for each knowledge base entry.
 
  if percentageMatch >= 50 then
   XMLMatch(arrayx, arrayy) = anchor
   arrayy = arrayy + 1            'add 1 to arrayy to increase it from 0 to 1 eg so you got the link and percentage hit together
   XMLMatch(arrayx, arrayy) = percentageMatch
   arrayx = arrayx + 1            'Add 1 to arrayx to move on to the next value of the array eg, 0,1,2 etc
   arrayy = 0              'set arrayy = 0 so that it only ever uses array spaces 0 and 1
  end if
 
  response.write("percentage score = " & percentageMatch &" <br>")
  response.write("anchor print out = " & XMLMatch(0,0) & "<br>")
  response.write("-----------------End of percentage work out-----------------------------<br>")
  end if
  xmlFeed()

 

any help to this little problem would be great.

also how do you get a 2 dimensional array that doesnt have to be fixed or is there another way to do what i have tried?

And how to sort a 2 dimensional array would be helpful too as i need to get the scores decending

0
minority2000uk
1/26/2006 10:11:20 PM
asp.net.web-forms 93655 articles. 5 followers. Follow

0 Replies
674 Views

Similar Articles

[PageSpeed] 26

Reply:

Similar Artilces:

DataWindow.NET and Web Forms #2
Hi, is it possible to develop web forms and use DataWindow.NET 1.0 ? If not in this version, when will it be possible? In what version ? And when will it be released ? A beta for Web Form capability is schedule for the middle to end of November. On 6 Oct 2004 02:42:05 -0700, Nuno Costa wrote: >Hi, > >is it possible to develop web forms and use DataWindow.NET >1.0 ? > >If not in this version, when will it be possible? In what >version ? And when will it be released ? Version 1.0 only supports Windows Forms applications. Version 1.5 will add suppo...

how to place a <form> in web form form
i placed a <form> in the web form, but i can't submit coz i neet to submit to another web site how can i do??? Mike Chan You cannot submit a <form> to another page if you have a RunAt="Server" in the form tag. Remove that RunAt="Server" and you can (though then you will need to use plain old HTML inside that form). What are you trying to do? Why do you need to post to another form?Starting with ASP.NET 2.0? Look at:Programming Microsoft Web Forms My Blog COZ I NEED TO POST SOME INFORMATION TO ANOTHER WEB SITE IS THERE ANY OTHER SOLUTION?M...

Implementing .Net Form into an APS.net web form, can this be done
I am new here, but have been searching for a while, and may not have the correct lingo to find what I am looking for.  I am tasked with implementing a .exe application that was writen vb6 then converted to .net into a new website my team is developing. The idea is to put each of the 3 different forms in this .exe application of 3 different .aspx pages. I have attempted multiple things to get this into the page and even started to just rewrite it as an ASP.net web form, but even then I can't reuse any of the code since the System.Web.UI.Page doesn't inherit the sa...

.Net 2.0 Web application using Vb.net is unable to create object of another dll writen in C# .net 2.0
Hi, I habe created one ASP.net web application using Vb.net which is adding reference of dlls written in C# and .net 2.0. But whenever trying to create object of referencing dll, it is throwing error :Object reference does not set to an object. But, locally it is working fine,. In the server i have deployed the .aspx files and dll files in the bin. There were already an web.config in the server which is of .net 1.1. But checked it is retrieving value for that web.config correctly. Should i have to deply any other files and if not what can be the solution for this? Please help. Thanks, So...

Web Forms ( Having 2 forms )
Hey programmers. I would like to know how do I handle if a page has 2 forms? It does not allow 2 forms. So how do I overcome this problem ? Because in that page itself, I will have Login and Register together. So there are 2 forms. And if validation occurs. It will not work because it suppose to validate Login and not Registration fields. Thank You. Hey, Create a login user control or custom control that handles logging into the application. BrianBrian"Trust in the Lord and do what is good; dwell in the land and live securely. Take delight in the Lord, and He will give you your...

Access .Net 2.0 Application from .Net 2.0 Web Site
I need to populate a specific form in a .Net desktop application from a .net web application.  Is there an easy way to go about this? Hi, Based on my understanding, you want to start an executable application from your ASP.NET websit, right? We can invoke Process.Start method (http://msdn.microsoft.com/en-us/library/system.diagnostics.process.start.aspx) to launch an executable application from ASP.NET application. Note: Please keep in mind, the ASP.NET application is running on the server, so it will start the executable application that exists in the server.   I look...

web.config problems when upgrading from .NET 2.0 Beta to .NET 2.0 release version
We uninstalled .NET 2.0 Beta and replaced it with .NET 2.0 release version.  And it messed everything up.  All applications now give weird errors indicating the lack of web.config files, despite the fact that they already have web.config files in place.  For example, the following error occurs even though the web.config file has <customErrors="Off">: Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for securit...

Web Matrix and .NET 2 #2
Hi, Last evening I modified the three config files in the Web Matrix folder (WM, Web Server and Class Browser) to target the .NET Framework beta 2. And it works, the WM app launches correctly and everything is cool ! So I tested some job done with .NET 1 and .NET 1.1, and it works too ! Web Matrix seems to be ready for the future ! Jim Hi Jim, Interesting! (Honestly, I did something like that when I was playing with WM and .NET Fx v1.2 some times ago..) WM is nifty and foundamental to VS (and the Express family) 2005, while I'd prefer VWD now, as it have IntelliSense an...

Formatting a decimal to 2 decimal places
Hi - just testing some code, and the code below returns a number with 3 decimal places (eg. 450.000). Will returning a decimal always give 3 decimal places, and if so, how can I remove the last one? I don't want to use: Return String.Format("{0:C}", decRunningTotal) - as that will automatically add a $ or £ or whatever to the start, and I'd like to control that. I'd really appreciate any help, thanks, Mark Function GetItemTotal() As String objDT = Session("Cart") Dim intCounter As Integer Dim decRunningTotal As Deci...

windows forms in vb .net into web forms
we are creating a database driven website as part of our project. currently we have forms connecting to the database created in visual basic. these windows forms we need to convert into web forms which are asp .net compatible. can u give me an answer or show me a way. Hi, because of the difference in nature between web and win applications you'll need to reimplement at least the UI part. If you have a multitiered application in which the busines logic and data access are in different parts/assemblies you can reuse them. Grz, Kris.Read my blog. Handy Firefox plugins for web developers.Wor...

.Net Web Form & Web Service Deployment
Hi all I have written some test web services and some web form applications and deployed them to my IIS. That's fine but I now want to deploy them to my real IIS server. I have created an msi for each but the problem is I seem to only be able to deploy to the default web site. Our default web site is turned off and instead we use several other sites. Does anybody happen to if Powerbuilder 11 supports non default web sites? If not do I need to hack the msi and if so can anybody suggest a suitable tool. I have Orca but it's not very friendly. Unless of course I knew exactly w...

How to Make Web Forms from other Web Forms
In putting together an ASP.NET application for a biz application, we have come to the point where there are three different types of basic forms which have, for the most part, been perfected. Now its is a matter of cloning those forms for various uses and modifying or adding code to suit the particular need. Copy and paste works OK, but there is a lot of changing of certain words, etc. Is there a way in ASP.NET to take these basic forms, turn them into classes or templates, create forms from them, then add or overwrite code? ? (Anybody who is a Vis Fox Pro programmer would know imme...

Web forms and mobile web forms
Hey everyone, I am looking to develope a web site that depending on the device connecting to it, it will display a certain page. In this case im looking to create a web and wap version of the same project. I have the Web forms version finished using ASP.NET and C# and I am wondering how to create the mobile web form and incorporate it in the project. In the project folder, can I just add a mobile web??? But what about displaying device specific pages?? Cheers -Dudach Yes, you can add mobile web forms and controls to your Web Application project. No problem. For device/br...

Differences between .net 1, .net 1.1, .net 2.0 and .net 3.0 #2
Hi, This seems to be a common question, but i havent got an answer yet:(Can, any one please explain me the differences between these versions.If you keep your feet firmly on the ground, you'll have trouble putting on your pants! There are too many differences for one email - - from 1.0 to 1.1 (not a whole lot of real change, other than fixes, at least compared to 1.1 to 2.0) With 2.0, there were many new declarative controls, with many new ideas added in With 3.0, it's a superset of 2.0 - instead of replacing the installation completely, it just 'added on' new functionality - I would...

convert java web app 2 .NET web app
Hi, i am able to convert java console app to .NET console app.but i am unable to convert java web based application to .NET web based application. can u give me some idea as to how to convert that. Thanks in advance,nizam. I believe the technical phrase is.. rtfm?  lol.  you're going to have to do it the hard way.  JSP operates on a different theory of web development than asp.net/asp.net 2.0Kay LeeMySpace.com - http://www.myspace.com/kragieInfrastructure GroupMySpace.com- Code to live, but Live to code. Try these two links for sample code and free book from Microsoft, ...

Web resources about - 2 decimal places - asp.net.web-forms

Penny (Irish pre-decimal coin) - Wikipedia, the free encyclopedia
The penny (1d) ( Irish : pingin ) coin was the third smallest denomination of the pre-decimal Irish pound , worth 1/240 of a pound or 1/12 of ...

Dewey Decimal Classification - Wikipedia, the free encyclopedia
This highly organized system categorizes books on library shelves in an efficient, specific and repeatable order that makes it easy to find any ...

Decimal Rounding on the App Store on iTunes
Get Decimal Rounding on the App Store. See screenshots and ratings, and read customer reviews.

Dewey Decimal Tattoo - Flickr - Photo Sharing!
Children's librarians represent.

Math of the Day: Sesame Street’s The Count Reads Pi to 10,000 Decimal Places
... has created a true monster out of your favorite Sesame Street vampire, with audio of The Count reading every digit of Pi out 10,000 decimal ...

Paul Harapin heads Decimal Software after VCE ousting
Former VCE Asia-Pacific boss, Paul Harapin, has taken over as CEO of Decimal Software.

Feeling green: the dangers of decimal currency
The curious case of possibly toxic coins, via Austria and a devastatingly original idea for Canberra.

Jobless Rates With Another Decimal
The BLS reported a jobless rate of 8.3% for both January and February. Adding an extra decimal, the unemployment rates would actually be 8.26% ...

JPMorgan Sued by Trader Over $3 Million Decimal Point
JPMorgan Chase & Co. is being sued by a trader who says he accepted a contract from the investment bank because a typographical error made him ...

.Decimal Archive - Houston Gamer
It was only back in August when newly-formed Houston game studio Orb Interactive launched a Kickstarter campaign for “.Decimal”, a sci-fi take ...

Resources last updated: 12/8/2015 1:09:48 AM