•December 12, 2009 •
Leave a Comment
I am currently a OpenDNS user. OpenDNS has block out a lot of dangerous sites / advertisement sites for me. I have no intention whatsoever to switch to Google Public DNS at the moment.
What is Google Public DNS?
Google Public DNS is a free, global Domain Name System (DNS) resolution service, that you can use as an alternative to your current DNS provider.
To try it out:
- Configure your network settings to use the IP addresses 8.8.8.8 and 8.8.4.4 as your DNS servers or
- Read our configuration instructions.
If you decide to try Google Public DNS, your client programs will perform all DNS lookups using Google Public DNS. |
Why does DNS matter?
The DNS protocol is an important part of the web’s infrastructure, serving as the Internet’s phone book: every time you visit a website, your computer performs a DNS lookup. Complex pages often require multiple DNS lookups before they start loading, so your computer may be performing hundreds of lookups a day. |
Why should you try Google Public DNS?
By using Google Public DNS you can:
|
Posted in Thoughts
Tags: dns, google, public dns
•December 12, 2009 •
Leave a Comment
In this Scenario, I have a gridview that has two checkbox fields and a comment field. Image Below. The checkboxes need to be mutually exclusive and still gives the user the ability to uncheck them. So the radio button control is out of the question because it would need more code to uncheck a radio button.

.aspx
</code>
<asp:GridView runat="server" ID="gvComments" AutoGenerateColumns="false" DataKeyNames="ID" >
<Columns>
<asp:TemplateField HeaderText="Strength">
<ItemTemplate>
<asp:CheckBox runat="server" ID="ckbStrength" />
<cc1:MutuallyExclusiveCheckBoxExtender runat="server" ID="mecbeStrength" Key="chkSAI" TargetControlID="ckbStrength" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField Headertext="Common Comments (Optional)" ItemStyle-Wrap="false" DataField="Comment" ItemStyle-HorizontalAlign="Center"/>
<asp:TemplateField HeaderText="Areas for Improvements" HeaderStyle-Width="10px" ItemStyle-VerticalAlign="Middle" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:CheckBox runat="server" ID="ckbAI" />
<cc1:MutuallyExclusiveCheckBoxExtender runat="server" ID="mecbeAI" Key="chkSAI" TargetControlID="ckbAI" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<code>
.aspx.vb
Protected Sub gvComments_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles gvComments.RowDataBound
If e.Row.RowType <> DataControlRowType.DataRow Then Exit Sub
'Declare mutuallyExclusiveCheckboxExtender variable
Dim rowView As DataRowView = e.Row.DataItem
Dim mecbeStrength, mecbeAI As AjaxControlToolkit.MutuallyExclusiveCheckBoxExtender
'Assign controls to variable
mecbeStrength = e.Row.FindControl("mecbeStrength")
mecbeAI = e.Row.FindControl("mecbeAI")
'Assign key+DataItemIndex to control
mecbeStrength.Key = "chkSAI" & e.Row.DataItemIndex
mecbeAI.Key = "chkSAI" & e.Row.DataItemIndex
End Sub
Posted in asp.net
Tags: vb.net, ajax, checkbox extender, mutually exclusive checkbox extender, mutually, gridview
•November 30, 2009 •
Leave a Comment
asp:Literal Reserves a location on the Web page to display static text.
- EnableViewState: A Boolean property signaling whether the control persists its view state (and the view state of any child controls it contains) to the requesting client. The default value is true.
- ID: A string value identifying the control on the page.
- Mode: A value that specifies how the content in the Literal control is rendered on the requesting client. The legal mode values include PassThrough, Encode, and Transform. PassThrough is the default value, as it passes through the text to the client. The Encode option converts the text into an HTML-encoded string before passing it to the client. Transform depends on the type of markup used, as it removes any elements not supported by the requesting client.
- Text: The caption displayed in the Literal control. This text is passed directly to the browser page when rendered by ASP.NET.
- Visible: A Boolean property signaling whether the control is displayed on the page when it is rendered. The default value is true.
Example:
I needed to turn the Static text from the literal control into a link that opens up a popup page. By using Literal instead of linkbutton, I prevented the postback that you normally get with linkbutton.
<asp:Literal runat="server" ID="literal" />
Code: The Code passes two variables to the literal link.
Public Sub Literal()
Dim x, y As Integer
x = ViewState("Activity")
y = ViewState("EditID")
Display a simple link:
literal.Text = "<a href='Log_CredsReqPopup.aspx?MiscCredID=" & x & "&RequestID=" & y & "'target='_blank'>Optional SLO</a>"
Display a simple link with onclick:
literal.Text = "<a href=""#"" onclick=""window.open('Log_CredsReqPopup.aspx?MiscCredID=" & ViewState("Activity") & "&RequestID=" & ViewState("EditID") & "','Log_CredsReqPopup','scrollbars=yes,width=400,height=650,resizable=no')"">Optional SLO</a>"
Display a button:
literal.text = "<input type='button' text='Optional SLO' onclick=""window.open('Log_CredsReqPopup.aspx?MiscCredID=" & ViewState("Activity") & "&RequestID=" & ViewState("EditID") & "','Log_CredsReqPopup','scrollbars=yes,width=400,height=650,resizable=no')"">"
End Sub
Posted in asp.net
Tags: asp:Literal, aspx, literal
•November 6, 2009 •
Leave a Comment
There are many ways to call a popup window from aspx. I only post the ones I have used. If you have used other ways. Please feel free to contribute. Thanks.
Sorry for the lack of explanations, as I am still learning myself.
Dim PopUpScript As String
PopUpScript = “javascript: window.open(‘Popup.aspx?’,'popupage’,’scrollbars=yes,width=790,height=510,resizable=no,left=10′)”
ScriptManager.RegisterStartupScript(Me, Me.GetType(), “PopUpScript”, PopUpScript, True)
To pass a variable ID to the next page, I use:
PopUpScript = “javascript: window.open(‘Popup.aspx?ID=1′,’popupage’,’scrollbars=yes,width=790,height=510,resizable=no,left=10′)”
2nd Method
Protected Sub lnkbutton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lnkbutton.Click
lnkbutton.Attributes.Add(“onclick”, “window.open(‘http://www.yahoo.com’,'null’,'height=768, width=1024,status= no, resizable=yes, scrollbars=yes, toolbar=no,location=no,menubar=no ‘);”)
End Sub
Posted in asp.net
Tags: asp.net, aspx, popup, Windows
•October 20, 2009 •
Leave a Comment
| DateTime.Now; |
10/20/2009 6:33:57 PM |
| DateTime.Now.ToString(); |
10/20/2009 6:33:57 PM |
| DateTime.Now.ToShortTimeString() |
6:33 PM |
| DateTime.Now.ToShortDateString() |
10/20/2009 |
| DateTime.Now.ToLongTimeString() |
6:33:57 PM |
| DateTime.Now.ToLongDateString() |
Tuesday, October 20, 2009 |
| DateTime.Now.ToString(“d”) |
10/20/2009 |
| DateTime.Now.ToString(“D”) |
Tuesday, October 20, 2009 |
| DateTime.Now.ToString(“f”) |
Tuesday, October 20, 2009 6:33 PM |
| DateTime.Now.ToString(“F”) |
Tuesday, October 20, 2009 6:33:57 PM |
| DateTime.Now.ToString(“g”) |
10/20/2009 6:33 PM |
| DateTime.Now.ToString(“G”) |
10/20/2009 6:33:57 PM |
| DateTime.Now.ToString(“m”) |
October 20 |
| DateTime.Now.ToString(“r”) |
Tue, 20 Oct 2009 18:33:57 GMT |
| DateTime.Now.ToString(“s”) |
2009-10-20T18:33:57 |
| DateTime.Now.ToString(“t”) |
6:33 PM |
| DateTime.Now.ToString(“T”) |
6:33:57 PM |
| DateTime.Now.ToString(“u”) |
2009-10-20 18:33:57Z |
| DateTime.Now.ToString(“U”) |
Tuesday, October 20, 2009 10:33:57 PM |
| DateTime.Now.ToString(“y”) |
October, 2009 |
| DateTime.Now.ToString(“dddd, MMMM dd yyyy”) |
Tuesday, October 20 2009 |
| DateTime.Now.ToString(“ddd, MMM d “‘”yy”) |
Tue, Oct 20 ‘09 |
| DateTime.Now.ToString(“dddd, MMMM dd”) |
Tuesday, October 20 |
| DateTime.Now.ToString(“M/yy”) |
10/09 |
| DateTime.Now.ToString(“dd-MM-yy”) |
20-10-09 |
Source: csharpfriends
Posted in asp.net
Tags: asp.net, aspx, datetime
•October 9, 2009 •
2 Comments
I stumbleupon OpenDNS.com and decided to give a try. Sign-up is necessary if you want to track your history. Three simple steps to get you up and running. Now, I have it setup on my home-network. Below shows a bit of my my settings and statistics.
I like how easy it is to filter contents and view the history with graphs. OpenDNS even allows you filter out individual website. Shortcut is another cool feature, which is like a safety net for when you are typing in the dark and you misspell .com to .cmo. In the case you misspell, OpenDNS will still redirect you to the right site but you must have the entries in there to correct your common mistakes.
- Change the DNS in your router
208.67.222.222
208.67.220.220
- Sign-up for an account (Optional)
- Login to manage your account (Optional)
Content Filtering

Categories

Statistics

Create Shortcuts

Posted in Thoughts
Tags: dns, OpenDNS
•October 6, 2009 •
Leave a Comment

With the Flexi-Drive S2S we introduce a flexible adjustable memory solution.
Simply insert the desired number of SDHC cards (max. 6) into the Flexi-Drive’s slots. The card’s individual memory capacities merge into one and are available as a single drive then.
Benefit from this flexible, convenient memory solution that can be used as a normal 2.5″ SATA HDD providing the advantages of a SSD: no noise emission, low power consumption and shock resistance.
Features:
• Fast modular SSD storage solution
• Memory size flexibly adaptable via SDHC memory cards (SLC/MLC)
• SATA interface (SATA I and II)
• 2.5″ format
• Zero noise emission, low power consumption, shock resistance
• No drivers or software required
Specifications:
• Use up to 6 SDHC cards as RAID0
• 6 slots for SDHC cards (4-32 GB)
• Supports SDHC cards only
• Flexible memory capacity
• Dimensions: 70 mm x 100 mm x 9 mm (W x L x H)
product page
Posted in Thoughts
Tags: DIY, SSD, storage
•October 3, 2009 •
Leave a Comment