Click here to Skip to main content
16,005,236 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: complex appSettings entries Pin
boy.pockets8-Sep-08 17:31
boy.pockets8-Sep-08 17:31 
GeneralRe: complex appSettings entries Pin
Venkatesh Mookkan8-Sep-08 17:37
Venkatesh Mookkan8-Sep-08 17:37 
AnswerRe: complex appSettings entries Pin
Venkatesh Mookkan8-Sep-08 17:31
Venkatesh Mookkan8-Sep-08 17:31 
GeneralRe: complex appSettings entries Pin
boy.pockets8-Sep-08 17:56
boy.pockets8-Sep-08 17:56 
AnswerRe: complex appSettings entries - the answer i was looking for Pin
boy.pockets8-Sep-08 20:17
boy.pockets8-Sep-08 20:17 
Questioncustom error mode Pin
Dpriya8-Sep-08 11:53
Dpriya8-Sep-08 11:53 
AnswerRe: custom error mode Pin
boy.pockets8-Sep-08 16:16
boy.pockets8-Sep-08 16:16 
QuestionConversion from type 'DBNull' to type 'String' is not valid Pin
gerryR.com8-Sep-08 11:00
gerryR.com8-Sep-08 11:00 
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
AnswerRe: Conversion from type 'DBNull' to type 'String' is not valid Pin
Christian Graus8-Sep-08 11:17
protectorChristian Graus8-Sep-08 11:17 
AnswerRe: Conversion from type 'DBNull' to type 'String' is not valid Pin
NeverHeardOfMe8-Sep-08 12:11
NeverHeardOfMe8-Sep-08 12:11 
GeneralRe: Conversion from type 'DBNull' to type 'String' is not valid Pin
gerryR.com8-Sep-08 12:35
gerryR.com8-Sep-08 12:35 
GeneralRe: Conversion from type 'DBNull' to type 'String' is not valid Pin
NeverHeardOfMe8-Sep-08 13:20
NeverHeardOfMe8-Sep-08 13:20 
GeneralRe: Conversion from type 'DBNull' to type 'String' is not valid Pin
Abhishek Sur8-Sep-08 20:54
professionalAbhishek Sur8-Sep-08 20:54 
QuestionPlease I need C# Code for Authenticating a user of an EXE with Wiondows Authntication Pin
Kicha Parameshwara Ekanta Raniyar8-Sep-08 5:45
Kicha Parameshwara Ekanta Raniyar8-Sep-08 5:45 
AnswerRe: Please I need C# Code for Authenticating a user of an EXE with Wiondows Authntication Pin
Manas Bhardwaj8-Sep-08 5:52
professionalManas Bhardwaj8-Sep-08 5:52 
AnswerRe: Please I need C# Code for Authenticating a user of an EXE with Wiondows Authntication Pin
Christian Graus8-Sep-08 6:30
protectorChristian Graus8-Sep-08 6:30 
GeneralRe: Please I need C# Code for Authenticating a user of an EXE with Wiondows Authntication Pin
Paul Conrad8-Sep-08 18:54
professionalPaul Conrad8-Sep-08 18:54 
AnswerGet a different job... Pin
leckey8-Sep-08 8:48
leckey8-Sep-08 8:48 
AnswerRe: Please I need C# Code for Authenticating a user of an EXE with Wiondows Authntication Pin
Blue_Boy8-Sep-08 8:53
Blue_Boy8-Sep-08 8:53 
QuestionHelp with PostBackTrigger Pin
Marcos Aguiar Jr8-Sep-08 5:31
Marcos Aguiar Jr8-Sep-08 5:31 
AnswerRe: Help with PostBackTrigger Pin
Manas Bhardwaj8-Sep-08 5:54
professionalManas Bhardwaj8-Sep-08 5:54 
GeneralRe: Help with PostBackTrigger Pin
Marcos Aguiar Jr8-Sep-08 6:38
Marcos Aguiar Jr8-Sep-08 6:38 
QuestionArticle on updating files to server Pin
eyeseetee8-Sep-08 4:55
eyeseetee8-Sep-08 4:55 
AnswerRe: Article on updating files to server Pin
Manas Bhardwaj8-Sep-08 5:06
professionalManas Bhardwaj8-Sep-08 5:06 
AnswerRe: Article on updating files to server Pin
Abhijit Jana8-Sep-08 19:26
professionalAbhijit Jana8-Sep-08 19:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.