C# Equivalent to IIF

by ebarcza 7/8/2011 5:10:00 AM

 Here's the C# equilvalent statement to VB IIF

ReturnValue = a == 1 ? true : false;

OR

<bool condition> ? <true value> : <false value>

Tags:

how to hide tabs in AJAX Toolkit tab panel

by ebarcza 7/7/2011 5:26:00 AM
In order to hide a panel in the Ajax Toolkit Tab Panel, set the enabled property of the tab to false. Setting the visible property to false will still show the header so this is the prefered method tbContract.Tabs[0].Enabled = false;

Tags:

C# Check for Null Querystring

by ebarcza 7/7/2011 3:54:00 AM
 if (Request.QueryString["ContractID"] != null && Request.QueryString["ContractID"].ToString() !="")
            {
                int contractID = int.Parse(Request.QueryString["ContractID"].ToString());
                Contract contract = new Contract(contractID);
                hdnContractID.Value = contractID.ToString();
                LoadForm(contract);
            }

Tags: , ,

.NET

Powered by BlogEngine.NET 1.5.0.7
Theme by Mads Kristensen

About the author

Name of author Author name
Something about me and what I do.

E-mail me Send mail

Calendar

<<  July 2017  >>
MoTuWeThFrSaSu
262728293012
3456789
10111213141516
17181920212223
24252627282930
31123456

View posts in large calendar

Recent comments

Tags

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2017

Sign in