We generally use ToLower or ToUpper in C#.But how can we change a string in title case.
Yes we can.We have System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase.
It takes string as parameter.
string strText = “my blog”;
string strTitleCase = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(strText);
That's It.
Enjoy Learning.
Shatrughna's Notes
About Microsoft Technologies
April 19, 2013
Make string title case in C#
April 18, 2013
January 7, 2013
Access parent page’s control on iframe page
When we are popping a popup using iframe and doing some changes reflection should come on parent page.
Write a JavaScript on iframe page that will access parent page control.
<script type="text/javascript">
function SetParentValue(val)
{
window.parent.document.getElementById('<Put here parent page control ID>').value = val;
}
</script>
Now you can call this function any where like button click event.
Enjoy Learning.
January 6, 2013
Pass multiple parameters query string run time in Data Control
How can we pass multiple query string values to query string run time in data control(Grid View,Repeater).
We need to simply create one function that will make URL run time.
Here is small example:
On aspx page:
<a href="<%# MakeURL( Eval("PID"),Eval("UID") ) %>"/></a>
On CS page:
public string MakeURL(object PID, object UID)
{
return "NewPage.aspx?PID=" + PID.ToString() + "&UID=" + UID.ToString();
}
That’s It.
Enjoy Learning.
August 3, 2012
Make some free phone memory in Android
Generally if you install any application in Android it goes automatically to Phone storage.
So if you want to make some more space for phone storage we need to move application to
USB storage.
Use below sequence of actions to accomplish this.
Settings =>Manage Applications =>Application (That you want to move USB storage) =>Move to USB storage.
Now you can check internal phone storage space.
That’s It.
Enjoy Learning.
No new Gmail notification in Android
Recently Gmail notification was stopped working on my android.
I figured out how I can restore it back.
There are some steps that we need to follow for the same.
Step 1:
Settings => Manage Applications => All => Gmail => Clear Cache & Clear data.
Step 2:
Settings => Accounts & Sync => Auto sync on
Step 3:
Settings => Accounts & Sync => Google => Sync Gmail on
Try above steps hopefully it should work now.
That’s It.
Enjoy Learning.