How to get the file name from a full file path?


If you have a full file path like D:\My Documents\myimg.jpg and you want to get just the file name myimg.jpg, you can get it with the help of the Path class in this fashion:-

In C#

string filename = Path.GetFileName(“D:\My Documents\myimg.jpg“);
In VB .NET

Dim fileName as String = Path.GetFIleName(“D:\My Documents\myimg.jpg”)

how to show numbers in 0, 1, 2, 3, 4 decimal places in a GridView?


When you have a GridView control and you bind it to a decimal field (for example), you can manipulate the format of the string shown by using the format specifier in the BoundField or in the Eval function in the TemplateField.

Here’s how you do it. Use the f with a number such as f0 for no decimal places, f2 for 2 decimal places and so on so forth.

<asp:BoundField DataField=”prodPrice” HeaderText=”Price” HtmlEncode=”False” DataFormatString=”{0:f0}” />

Or in TemplateField

<asp:TemplateField HeaderText=”Price”>
<ItemTemplate>
<%#Eval(“prodPrice”,”{0:f0}”)%>
</ItemTemplate>
</asp:TemplateField>

You can change the f<number> to any value to get numbers like 2 with f0 and 2.0 with f1 and 2.00 with f2 and so on…

Capital Development Authority’s corruption in plot allotment contd…


My dad wrote that application back in 2001 and he died in 2005. At the end he was thinking about selling out our house. I guess he couldn’t handle the stress. Got brain hemorrhaged.

I believe CDA is one of the most corrupt organization in Pakistan.

Capital Development Authority’s corruption in plot allotment


To

The Chairman,

Capital Development Authority, Islamabad.

Subject: CONFIRMATION OF ALLOTMENT OF PLOT NO: 374/A, I-10/4.

Sir,

With due regards it is submitted:

i. That I remained employed in M/S International Aeradio Limited, Saudi Arabia w.e.f. March 1977 to March 1987 after which I returned home. During August 1992, I purchased plot no. 374-A. Sector I-10/4 measuring 30’ x 50’ from Mr. Fazal Karim. After making verbal inquiries from your Rehabilitation Directorate that the plot was clear and there was nothing against it. On Confirmation of acceptance of transfer application by the then A.D., Estate Management, CDA I paid the cost of the plot i.e. a sum of Rs. 750,000/- (Rupees Seven hundred and fifty thousand only) to Mr Fazal Karim vide agreement dated August 08, 1992 (Attested copy enclosed).

ii. That after duly accepting the transfer application of August 08, 1992, the CDA issued me the transfer order vide letter no. CDA/EA-374-A/I-10/4/350 dated August 19, 1992 (Attested copy enclosed).

iii. That I decided to construct a house on this plot during early 1995 and requested the CDA for handing over the possession of the plot to me which was given to me on February 28, 1995 vide no. CDA/PLW-L Survey-1(17)/90/1165 (Attested copy enclosed)

iv. That I submitted a building plan which was approved on April 11, 1995 vide no CDA/ Arch-6(24) I-10/4/2880/95 (Attested copy enclosed)

v. That I requested for a water connection which was allowed vide no. CDA/ DD (W/M)Accts/95 dated June 27, 1995 (Attested copy enclosed).

vi. That I requested for permission for a Road Cut which was granted vide no. CDA/ DDRD-v-80(58)/95/1163 dated July 19, 1995 (Attested copy enclosed)

vii. That the work for water connection was in progress on July 20, 1995 when it was stopped on the verbal directions of the DD concerned. Later, it was stated that the neighbors had moved in the Court of Law against the allotment of the plot and that injunction inhibiting the construction on the plot was imposed by the Civil Judge, Islamabad. Court proceedings continued till October 10, 2001 and the case now stands decided against me on the evidence of the Planning Directorate of CDA that no such plot has been created by the CDA (Attested copy enclosed)

viii. That I have filed an appeal in the Session Court against the above mentioned order of the Civil Court on October 25, 2001.

1. Sir, all CDA offices dealing with allotment, transfer, possession, approval of building plan, approval of water connection and sanction for road cut in respect of any plot in Islamabad fully agree with the genuineness of the subject plot and all charges thereof have duly been paid to the CDA. However, the Planning Directorate claims that they did not create any such plot. At the time of purchasing the plot, I did not make inquiry about the correctness of creation of plot from the Planning Directorate because the plot has been allotment to Mr. Fazal Karim by the Rehabilitation Department and there was no reason to suspect that the plot had not been created; moreover, the CDA’s acceptance of transfer documents is the most valid authentication of the correctness of ownership of any plot to be purchased within the CDA’s jurisdiction. It is therefore, unimaginable that six different offices of as consummate an organization as CDA could process a matter, accept the cost and other charges and issue necessary sanctions in respect of a plot which does not even exist in the records of their own Planning Directorate. Incidentally, the Land Survey Division and B&BC who gave the possession of the plot and approved my building plans are under the Planning and Design Wing of the CDA.

2. Sir, I am a bona fide purchaser of the plot and after having returned from abroad was unable to detect any anomaly/fraud in this case, if any. It would have been appreciated that as I started constructing the house three years after I purchased the plot, anything more should not have been required to prove that I was a genuine buyer. Had I not been a genuine buyer, I would have tried to dispose off the plot at the earliest rather than to wait for three years for starting the construction process. It is stated that not less than six CDA’s most responsible and experienced offices, each headed by at least a Deputy Director as mentioned above, could also not detect anything wrong in the case till it was objected by the neighbors who, in fact, have encroached upon the said piece of land for their personal and purely domestic use –even though they have a proper ground probably less than 200 meters from the neighborhood — whereas I have paid full cost of the said land but am still being forbidden to use it.

3. Considered with an open mind, one can surely comprehend that I have unduly been subjected to unjustifiable punishment, mental torture, frustration and financial loss for the last more than six years without any fault of mine whatsoever and am waiting for the finalization of my right on a piece of land for which CDA is the sole custodian and has already received the price. Although this plot is said to have been irregularly created by one of CDA’s own offices, without the concurrence of competent authority, CDA may approve its creation from the retrospective, through ex-post-facto sanction because the site is still vacant, the cost has already been paid to the CDA, all the six formalities completed and CDA, under the rules, is fully empowered to create a residential plot anywhere in such areas. If this proposal is not acceptable a similar and equivalent plot may be allotted to be elsewhere in the same sector.

4. It is added that I am already more than 58 years old. I shall be obliged if this case is settled and I am allowed to build my house as early as possible because it is already too late.

5. Sir, I am prepared to accept any reasonable solution of the problem if the case is departmentally taken up and decided outside the court in the light of the above submissions.

Yours Sincerely,

Muhammad Akram.