Aug 9 2006

Extended GridView Control

Category:Bil@l @ 06:06

In this article I explain in detail an extended GridView control developed based on the GridView control that ships with ASP.NET 2.0. Also discussed are important features of this new GridView: the built-in context menu row-based and the Filter textbox to filter the GridView's rows.

You can check this article at: http://aspalliance.com/946

Hope you will enjoy it!

Regards

Tags:

Aug 5 2006

Databinding Expressions in ASP.NET 1.1/2.0

Category: ASP.NET 2.0 - GeneralBil@l @ 07:47

A very common question on the ASP.NET forums is how to do expression databinding on the ASPX page.

The ASP.NET allows you to use 3 different binding expressions:

1- <% %>
You can use the above expression to execute some C#/VB.NET code as follows:

<% Response.Write("Hello World"); %>

Which will print out "Hello World" on the page.

2- <%# %>
This expression can be used to execute any property, collection, expression, or method result on the ASPX page.

  1. <%# CustomerID %> will print out the customer ID provided CustomerID is a public property/field.
  2. <asp:ListBox ... datasource='<%# studentArray %>' ... /> this will bind the ListBox to an array of students.
  3. Full Name: <%# (Student.FirstName + " " + Student.La   stName) %>
  4. Number of users online: <%# GetUserCount() %>

The main idea here is that, the expression within the <%# %> is only executed when Page.DataBind() is called.

3- <%= %>
This works the same as the above expression syntax with the difference that this syntax is executed on page load without the need to call Page.DataBind(). Similar to Response.Write().

hth,

Regards


Candidates for test 70-620 should have minimum one year of experience in the IT industry. They characteristically make available phone support at the tier-1 or tier-2 level in a broad range of environments, incorporating retail stores and the small organizations or enterprise environment. 1Y0-259 is a Citrix Presentation Server 4.5 administration test. SY0-101 is a CompTIA Security+ exam. Designing unified Cisco multilayer switched networks is the task which requires you to pass 642-812.

Tags:

Aug 1 2006

HttpResponse.ApplyAppPathModifier Method

Category: ASP.NET 2.0 - GeneralBil@l @ 08:50

A very interesting method I came over today:

HttpResponse.ApplyAppPathModifier

According to the MSDN documentation:

Adds a session ID to the virtual path if the session is using Cookieless session state and returns the combined path. If Cookieless session state is not used, ApplyAppPathModifier returns the original virtual path.

This is very cute!! If you are using cookieless session state, you can easily you this method, give it a virtual path, it will automatically append the SessionId to the URL without any need to do any manual effort!!!

It is also helpful, when you want to redirect from Http to Https or vicaversa, it helps you maintain the same session Id when moving!

This is a small example:

Response.Write(Response.ApplyAppPathModifier("demo/default.aspx"));

will generate something as:

/App/(S(avsbnbml2n1n5mi5rmfqnu65))/demo/default.aspx

Hope this helps!

Regards

Tags:

Jul 24 2006

The Last Night!!

Category:Bil@l @ 21:30

This is my last night I sleep here in my home in Beirut!! Tomorrow morning I am leaving outside the country following my company and going away from this ugly war we have that stopped everybody in Lebaon from going to their jobs, stopped them from their normal life they used to have!!!

I am leaving my beloved country and the pain is hitting every single part of my body, the pain of those families who lost their homes in thousands, the pain from what happened to my country, from the destruction we had here, from the hundreds of people who were killed and mainly children!!!

I am leaving my country and my heart is staying here, he is not accepting to leave his house, his country, his family, his friends, his beloved people!!!!!!

I will come back. Lebanon is for me, for every person who believes in Lebanon, we will build it again, no one would ever erase us from existence!!!!!

Good bye my lovely Lebanon, till the time we meet again, let God bless you and bless all your beloved people!!!

Tags:

Jul 20 2006

No Comments!!

Category:Bil@l @ 16:28

 

Tags:

Jul 18 2006

Support my country!!

Category:Bil@l @ 08:41

For the 7th consecutive day, my country is under attack by Israel!!! More and more civilians are killed daily!!

Support my country and express your resistance for the barbarians here by posting your comments below!!!

Tags:

Jul 17 2006

XSLT Debugging in .NET 2.0

Category: XSLT, XPath, XMLBil@l @ 11:59

You can now debug an XSLT document in .NET 2.0.

You have now the XslCompiledTransform object that is used to do the transformation in .NET 2.0.

When you create your instance of the XslCompiledTransform use this constructor:

XslCompiledTransform xsl = new XslCompiledTranform(true);

Then, set a break point on the Tranform method call, when the debugger is there, hit F11 to enter the XSLT document and start debugging your Xslt file!

hth,

Regards

Tags:

Jul 17 2006

Lebanon under attack, 6th day

Category:Bil@l @ 10:21

Today is the 6th day of the Israeli attacks on Lebanon. More civilians are killed, more buildings, bridges, ports, etc .. are destroyed.

Anybody to care or stop all that???????

Tags:

Jul 16 2006

Lebanon still under attack

Category:Bil@l @ 13:00

My beloved country is still under attack for the 4rth consecutive day by the barbarians, Isarel. The primse minister declared Lebanon a "disaster zone" and asked all the internal community to help us get out of this disaster.

Any country can listen and save what is left from Lebanon????????

Tags:

Jul 13 2006

Lebanon Under Attack by Israel

Category: General | GeneralBil@l @ 21:52

For the second consecutive day,