Archive for the 'Programming' Category

Setting the NavigateUrl property of a hyperlink control in gridview is very easy. But what if you want to pass the value of a specific field in your gridview as a url parameter of your hyperlink control? Well here’s how to do it.
Let say we have a customer list in a gridview and an edit [...]

Problem: I customized my gridview and created a set of boundfield columns. Now, I need to make one of these boundfields be clickable or some sort of hyperlink.
Solution: Create a TemplateField and a hyperlink control in your ItemTemplate.

<asp:GridView ID="GridView1" runat="server">
   <Columns>
      <asp:TemplateField>
         <ItemTemplate>
            <asp:HyperLink ID="Hyperlink1" runat="server"
               Text='<%# Bind("FieldName") %>'>
            </asp:HyperLink>
         </ItemTemplate>
      </asp:TemplateField>

In this example, the HyperLink Text property is binded to a specific [...]

DIV vs. TABLES

12Dec06

Tables were not created for web layout or positioning. Tables were created to provide structure to data. They were created to contain tabular data. Though the early html standard uses table for layout purposes, yet it is not the best tool for it. The main disadvantage of using tables to layout a page is [...]

When passing information via URL variables, we have to be careful that those variables do not contain non-URL-friendly characters. This includes spaces and non-alpha-numeric characters…
to be able to pass this characters, you have to first convert it to URL-safe hexadecimal escape characters…
And to do that, just use the URL encode function..
In classic Asp and Asp.Net:
Server.UrlEncode()
In [...]

While working with a certain web application, I just found my self trapped on a string concatination problem. What I’m tryin’ to do is concatenate 2 strings and assigning the output to the first string. My code goes something like this:

PSEUDO CODE
var myString=””;
for(i=1;myQuery.recordCount;i++){
     myString = myString & myQuery.record[i];
}
note:
Let say myQuery is a SQL query which returns
all [...]


Calendar

January 2009
M T W T F S S
« Dec    
 1234
567891011
12131415161718
19202122232425
262728293031