User Profile

Collapse

Profile Sidebar

Collapse
choudhmh
choudhmh
Last Activity: Jan 31 '15, 02:31 PM
Joined: Feb 27 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Thank you its functions.
    I also databinded the name of each item to a dropdown list.
    Code:
     DropDownList1.DataSource = metalsSource
            DropDownList1.DataTextField = "Name"
            DropDownList1.DataBind()
    Now say if I choose Silver from the dropdown list, how will I display on a say textbox the price of Silver in one of the currency rate say in Euro or Dollar
    As all data will be on a grid how do...
    See more | Go to post

    Leave a comment:


  • Thank you very much for the code. Sorry been away from coding for a week concentrating on the theory aspect of the course.
    The code works perfectly.
    When it data binds it also displays the rates for each currency.
    tried amending the code so the databind is not shown instead it just reads it and calculates EURO AND Dollar value. Is there a way of doing this?

    Again thank you very much for showing me the rope.
    ...
    See more | Go to post

    Leave a comment:


  • Now having issues with this line
    Gridview1.Datab ind()

    It throws an exception stating object reference not set to an instance.
    Had to physically add in the path to the csv file instead of the servermap
    See more | Go to post

    Leave a comment:


  • Tried adding check for length but still the same issues as mentioned above arises:

    Code:
    If File.Exists("C:\Users\Mahmud\Documents\Visual Studio 2013\WebSites\WebSite2\metals.csv") Then
                Dim data As String() = File.ReadAllLines("C:\Users\Mahmud\Documents\Visual Studio 2013\WebSites\WebSite2\metals.csv")
    
                If File.Exists("C:\Users\Mahmud\Documents\Visual Studio 2013\WebSites\WebSite2\rates.csv")
    ...
    See more | Go to post

    Leave a comment:


  • Done what you asked me to do.
    an IndexoutOfRange Exception is thrown on this code:
    metalsSource.Ad d(New Metal(data(0), data(1)))

    It seems metalsSource cannot retrieved the data. What else can be done
    See more | Go to post

    Leave a comment:


  • Tried your code with the metal as object. Keep on getting errors:

    Code:
    Imports System.IO
    Imports System.Data
    
    Public Class Metal
        Inherits System.Web.UI.Page
    
        Public Property Name As String
        Public Property BasePriceInGrams As Double
        Public Property AmountInGrams As Double
    
        Public ReadOnly Property Cost As Double
            Get
                Return
    ...
    See more | Go to post
    Last edited by Rabbit; Jan 13 '15, 10:54 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data. Second warning

    Leave a comment:


  • Sorry its a project for college, so a bit confused on what your trying to communicate.
    The model is not doing any calculation at the moment, its just reading data from the CSV (metal) file.
    I need to assign calculation on the Euro & Dollar column using the figures from the pound column and rates from the CSV file.
    If you can direct me with some codes that will be great; all files are attached with the website I'm trying to...
    See more | Go to post

    Leave a comment:


  • Bit confused with your model.
    The data is in a CSV file I only made it into a table so you understand.
    I have 2 CSV, first one should display the metal type and the price in pounds. These item should be shown in DataGrid.
    The next CSV has rates in Euro and Dollar, I should use (read) the rates and use (multiply) by the pound rate value in the DataGrid column 2 and get a total value on column 3 & 4:

    Code:
    Imports
    ...
    See more | Go to post
    Last edited by Rabbit; Jan 13 '15, 12:49 AM. Reason: Please use [code] and [/code] tags when posting code or formatted data.

    Leave a comment:


  • Read CSV Files, then Display in Table format using variables

    I need to read and display data from a csv file in a table format. I then will need to use these data to calculate different values.
    This is how the CSV file looks:
    Code:
    <table> <tr> <td>9 carat gold</td><td>11.87</td> </tr><tr> <td>18 carat gold</td><td>23.73</td> </tr><tr> <td>Silver</td><td>0.49</td> </tr><tr>
    ...
    See more | Go to post
    Last edited by Frinavale; Jan 12 '15, 04:55 PM. Reason: Added code tags.

  • choudhmh
    replied to Login Code
    The Null is stopping at:
    password = DLookup("Passwo rd", "tblUsers", "[UserName]=" & Me.txtUser).

    Also if i keep the:

    On Error GoTo Err_go_Click
    then i get this error: Label not defined.

    If i delete that line then the null error comes in.

    Thanks for all your help
    See more | Go to post

    Leave a comment:


  • choudhmh
    replied to Login Code
    now i get
    run time error '94'
    invalid use of null
    See more | Go to post

    Leave a comment:


  • choudhmh
    replied to Login Code
    I tried what you showed me, i still get the same error;

    "compile error: Syntax Error" on If password = Me.txtPass

    Not sure whats the problem. I've named my textboxes as txtUser & txtPass - but still get the error. Try on your one - i'm giving up on this now.

    Thanks for your help
    See more | Go to post

    Leave a comment:


  • choudhmh
    replied to Login Code
    I inserted this code in the button click event handler but keep on getting a command syntax error on If password = Me.txtPass.
    at present my table has three field loginid, username and password. Do i have to specify the table through a select statement.

    Private Sub go_Click()
    On Error GoTo Err_go_Click
    Screen.Previous Control.SetFocu s


    Dim password As String

    If Not IsNull(Me.txtUs er)...
    See more | Go to post

    Leave a comment:


  • choudhmh
    started a topic Login Code

    Login Code

    I have a problem; i know its a simple code but find it difficult to contruct the code.

    I have two fields username and password. I need some code, when a user clicks the button event in the form it checks against the username and password in the table to see if its correct; if correct it let you login else a message box should show either the username or password is wrong.

    Can someone give me a sniplet of the code that...
    See more | Go to post
No activity results to display
Show More
Working...