Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check for NULL or 0 at the same time
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
OS:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01329868
Message ID:
01330010
Views:
18
Hi Paul,

I take it back. I could not make it work. I guess I need to either somehow decode it or do something with special characters.

Here is my method
public static string CreateLink(object value, string UserControlName, string FieldName)
    {
        string link = "<a href=\"javascript:void(0)\" onClick=\"openCreateID('" + FieldName.ToLower() + "Name','" + UserControlName + "')>Enter " + FieldName + @"'s Info first</a>";
        if (value != null && value.ToString() != "0")
        {
            return string.Format("<a href=\"javascript:void(0)\" onClick=\"openPeopleID('{0}')>" + FieldName + "'s Information</a>", value);
        }
        return link;
    }
But it produces expected ; error in JavaScript and weird page output.

Would you please help me with this?

Thanks again.



UPDATE. I was able to make it to work.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform