|
-
Sep 18th, 2004, 11:34 PM
#1
Thread Starter
Frenzied Member
Vb.net Equvilent for ... [Resolved]
C#
Code:
string val = Request.QueryString["val"]==null?"defaultvalue":Request.QueryString["val"].ToString();
was looking at some C# code and found noticed that this looks really handy.
Last edited by <ABX; Sep 21st, 2004 at 10:33 AM.
Tips:
- Google is your friend! Search before posting!
- Name your thread appropriately... "I Need Help" doesn't cut it!
- Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
- Allways Include the Name and Line of the Exception (if one is occuring!)
- If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)
If you think I was helpful, rate my post  IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous
-
Sep 19th, 2004, 02:09 AM
#2
Lively Member
c# aint my thing but it looks like possibly...
string val = Request.QueryString["val"]==null?"defaultvalue":Request.QueryString["val"].ToString();
Code:
Dim val As String = IIF(Request.QueryString Is Null, "DefaultValue", Request.QueryString("val").ToString())
-
Sep 19th, 2004, 11:18 AM
#3
Thread Starter
Frenzied Member
forgot about IIF
thanx
Tips:
- Google is your friend! Search before posting!
- Name your thread appropriately... "I Need Help" doesn't cut it!
- Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
- Allways Include the Name and Line of the Exception (if one is occuring!)
- If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)
If you think I was helpful, rate my post  IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|