Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
G

gerryR com

@gerryR com
About
Posts
7
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Random number but in increments of X
    G gerryR com

    Doh! Spot on, thanks :)

    Visual Basic tutorial question lounge

  • Random number but in increments of X
    G gerryR com

    Hi all I'm working on something where a random num is generated between 0 and a user defined number. I need the random numbers to be in increments of 15 instead of 1 e.g. random numbers between 0 and 90 would only be 0 15 30 45 60 75 90 I figure I can do this by generating the random numbers between 1 and 7 for the above example and then substitute: 15 for 1 30 for 2 etc. etc. But just though I'd ask here in case there's an easier way? Appreciate a point in the right direction, rgds gerryR Below is my rand function

    Private Function genRand(ByVal intX As Integer) 'Function used to generate a random number between 0 and a given number
    Dim intRandNo As Integer
    intRandNo = Int(Rnd() * intX)
    Return intRandNo
    End Function

    Visual Basic tutorial question lounge

  • connection string prob, works in VS but not IIS
    G gerryR com

    Hi All I've got the following connection string in my web.config file, when I "view in browser" through VS's built in web server everything works fine, however when I copy everything to the IIS wwwroot folder and browse that I get the following error: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified I've searched high an low but can't get the thing working! <add name="ConnectionString5" connectionString="DSN=Excel Files;DBQ=C:\Inetpub\wwwroot\A2Z.xls;;DefaultDir=C:\Inetpub\wwwroot;DriverId=1046;MaxBufferSize=2048;PageTimeout=5;" providerName="System.Data.Odbc"/> Really appreciate any help (again :( )

    ASP.NET help visual-studio sysadmin windows-admin

  • Conversion from type 'DBNull' to type 'String' is not valid
    G gerryR com

    Thanks once again Phil, workes perfectly! One question, if I leave the CStr out it still seems to work, is there some other reason for having it in other than just good code practice? (not that that's not reason enough!) Thanks again gerryR

    ASP.NET help question csharp asp-net docker

  • Conversion from type 'DBNull' to type 'String' is not valid
    G gerryR com

    Hi All Slowly getting through my 1st asp.net page but need to pick your brains (again!) Basically I'm pulling data from an excel sheet, one of the thing's I'm doing with the data is making a url link, if there's text in column 2 then that's to be the text for the link, if there isn't then the text in column 1 is the text for the link. Problem is, as there doesn't necessarily have to be text in column 2 I'm getting a dbnull error. Below is my function and the asp code refering to that function. I know I need to put some error handeling but my big question is where? Is it within the function or within the asp link?

    Function MakeLinkText(ByVal name As String, ByVal description As String) As String
    If description = "" Then
    name = name
    else
    name = description
    end if
    return name
    End Function

    <asp:TemplateField HeaderText="LinkText"><ItemTemplate><%# MakeLinkText(Container.Dataitem("title"), Container.Dataitem("refer to")) %></ItemTemplate></asp:TemplateField>

    I did try on error resume nextwithin the function but still got the error (I realise thats very bad practice, I was just trying to narrow down the cause of the error. Appreciate a point in the right direction. Rgds gerryR

    ASP.NET help question csharp asp-net docker

  • Using conditional statements in datagrid?
    G gerryR com

    Thanks for that, Couldn't get my head around the databound method, I'll save that for another day. Got the function method working although I ran into another problem with that (null values), I'll post a seperate message about that. Thanks again gerryR

    ASP.NET css com question

  • Using conditional statements in datagrid?
    G gerryR com

    Hi All I'm trying to create a simple aspx page by pulling info from an existing excel sheet into a data grid. What I need to do is apply some conditions to this so that certain info is displayed depending on certain conditions. eg datagrid: name nickname URL link gerry http://gerry.com gerry william bill http://william.com bill What I need is if there's a value in nickname then the Text for the link will be that value, if not then it will be the name value. I've tried creating a template column but can see anywhere to put an if statement in there either. I'm new to all this and am not looking for someone to do this for me, just point me in the right direction as I want to understand why I'm doing what I'm doing. I appreciate any pointers anyone can give me. Rgds gerryR

    ASP.NET css com question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups