Tuesday, December 30, 2014

Checkboxs Enable / Disable in Asp.net Gridview Based on Condition in C#, VB.NET

Introduction:

Here I will explain how to enable or disable checkbox in gridview based on condition in asp.net  using C# and VB.NET.

We use gridview rowdatabound event for enable / disable checkbox in gridview based on conditions.
The below Code is the Event for enable / disable checkbox.

protected void gvDetails_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
CheckBox chk = (CheckBox)e.Row.FindControl("chkSelect");
if (e.Row.Cells[4].Text == "Hyderabad")
{
chk.Enabled = false;
}
else
{
chk.Enabled = true;
}
}
}

How to Get Selected Row Cell value from Gridview in Asp.net C#

Introduction:

Here I will explain how to get selected row cell value from gridview in asp.net using C# and VB.NET or get cell values from selected row cell values from gridview when checkbox selected in asp.net using C# and VB.NET.

The below code to get checkbox selected row values from gridview.
foreach(GridViewRow  gvrow in gvDetails.Rows)
  {
  CheckBox chk = (CheckBox)gvrow.FindControl("chkSelect");
  if (chk != null & chk.Checked)
  {
  str += gvDetails.DataKeys[gvrow.RowIndex].Value.ToString() + ',';
  strname += gvrow.Cells[2].Text+',';
  }
}

Monday, December 29, 2014

How to highlight search results in Gridview using asp.net C#

Introduction:
In this article I will explain how to search records in gridview and highlight search keywords in gridview using asp.net.

Here my requirement is I have a web page that contains Search textbox, button and gridview with some data now I want to display data in gridview whenever user enter text in textbox and hit search button after that I need to highlight that resultant keyword in gridview using asp.net. To implement this first design the table in database and give name UserInfomation

ASP.Net - Add Items to Dropdownlist Programmatically on Button Click in C#

Introduction:

Here I will explain how to add items to dropdownlist programmatically on button click in asp.net using c# and vb.net or dynamically add items to dropdownlist on button click in asp.net using c# and vb.net.

To implement this first create new application and write the code in aspx page as shown below
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Dynamically Add items to dropdownlist in asp.net</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<b>Enter Name</b><asp:TextBox ID="txtName" runat="server" /><asp:Button ID="btnAdd"
runat="server" Text="Add Items" onclick="btnAdd_Click" /><br />
Select UserName: <asp:DropDownList ID="ddlUsername" runat="server"/>
</div>
</form>
</body>
</html>

How to Validate Dropdownlist using JavaScript in HTML, Asp.net

Introduction:

Here I will explain how to validate dropdownlist using JavaScript in asp.net or html or dropdownlist validation using JavaScript in html or asp.net. To validate dropdownlist first we need to get selected value of dropdown based on that we can raise validation message.

 Validate Dropdownlist

To validate dropdownlist we will write code like as shown below here we will get dropdownlist selected value and check if it matching with first option value because first option value if we give it as “zero” we can compare value easily and raise validation
<script type="text/javascript">
function ValidateDropdown() {
var result = document.getElementById('<%=ddlEducation.ClientID%>').value;
if (result == "0") {
alert("Please Select Education");
}
else {
alert("Dropdownlist Selected Value is: " + result);
}
}
</script>
 
For Complete example the code like as shown below:
Validate Dropdownlist using Javascript in HTML:
 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Validate Dropdownlist using JavaScript</title>
<script type="text/javascript">
function ValidateDropdown() {
var result = document.getElementById('<%=ddlEducation.ClientID%>').value;
if (result == "0") {
alert("Please Select Education");
}
else {
alert("Dropdownlist Selected Value is: " + result);
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
Select Education:
<asp:DropDownList ID="ddlEducation" runat="server">
<asp:ListItem Value="0" Text="--Select Education--" />
<asp:ListItem Value="B.Tech" Text="BCIT" />
<asp:ListItem Value="MCA" Text="MCA" />
<asp:ListItem Value="MBA" Text="MBA" />
<asp:ListItem Value="BSIT" Text="BSIT" />
<asp:ListItem Value="MBBS" Text="MBBS" />
</asp:DropDownList>
<input type="button" value="Validate Dropdown" onclick="ValidateDropdown()" />
</div>
</form>
</body>
</html>
 
asp.net dropdownlist control 
 asp.net dropdownlist control we can use same code but only getting dropdownlist value in JavaScript code will change because in JavaScript we can identify asp.net controls by adding ClientID  
 
 

Monday, December 22, 2014

ذکر اس پری وش کا، اور پھر بیاں اپنا


 ذکر اس پری وش کا، اور پھر بیاں اپنا
بن گیا رقیب آخر تھا جو راز داں اپنا

وفا کیسی کہاں کا عشق جب سر پھوڑنا ٹھہرا

کسی کو دے کے دل کوئی نوا سنجِ فغاں کیوں ہو

نہ ہو جب دل ہی سینے میں تو پھر منہ میں زباں کیوں ہو

وہ اپنی خو نہ چھوڑیں گے ہم اپنی وضع کیوں چھوڑیں*

سبک سر بن کے کیا پوچھیں کہ ہم سے سر گراں کیوں ہو

کِیا غم خوار نے رسوا، لگے آگ اس محبّت کو

نہ لاوے تاب جو غم کی، وہ میرا راز داں کیوں ہو

وفا کیسی کہاں کا عشق جب سر پھوڑنا ٹھہرا

تو پھر اے سنگ دل تیرا ہی سنگِ آستاں کیوں ہو

قفس میں مجھ سے رودادِ چمن کہتے نہ ڈر ہمدم

گری ہے جس پہ کل بجلی وہ میرا آشیاں کیوں ہو

یہ کہہ سکتے ہو "ہم دل میں نہیں ہیں" پر یہ بتلاؤ

کہ جب دل میں تمہیں تم ہو تو آنکھوں سے نہاں کیوں ہو

غلط ہے جذبِ دل کا شکوہ دیکھو جرم کس کا ہے

نہ کھینچو گر تم اپنے کو، کشاکش درمیاں کیوں ہو

یہ فتنہ آدمی کی خانہ ویرانی کو کیا کم ہے

ہوئے تم دوست جس کے، دشمن اس کا آسماں کیوں ہو

یہی ہے آزمانا تو ستانا کس کو کہتے ہیں

عدو کے ہو لیے جب تم تو میرا امتحاں کیوں ہو

کہا تم نے کہ کیوں ہو غیر کے ملنے میں رسوائی

بجا کہتے ہو، سچ کہتے ہو، پھر کہیو کہ ہاں کیوں ہو

نکالا چاہتا ہے کام کیا طعنوں سے تُو غالبؔ

ترے بے مہر کہنے سے وہ تجھ پر مہرباں کیوں ہو


آہ کو چاہیے اِک عُمر اثر ہونے تک

آہ کو چاہیے اِک عُمر اثر ہونے تک

کون جیتا ہے تری زُلف کے سر ہونے تک

دامِ ہر موج میں ہے حلقۂ صد کامِ نہنگ

دیکھیں کیا گُزرے ہے قطرے پہ گُہر ہونے تک

عاشقی صبر طلب ، اور تمنّا بیتاب

دل کا کیا رنگ کروں خونِ جگر ہونے تک

ہم نے مانا کہ تغافل نہ کرو گے ، لیکن

خاک ہو جائیں گے ہم، تم کو خبر ہونے تک

پرتوِ خُور سے ، ہے شبنم کو فنا کی تعلیم

میں بھی ہوں ، ایک عنایت کی نظر ہونے تک

یک نظر بیش نہیں فُرصتِ ہستی غافل !

گرمئ بزم ہے اِک رقصِ شرر ہونے تک

غمِ ہستی کا ، اسدؔ ! کس سے ہو جُز مرگ ، علاج

شمع ہر رنگ میں جلتی ہے سحر ہونے تک

Saturday, December 20, 2014

Convert to numbers to arabic words language and arabic numbers( .NET / C# )

I have one request for Convert to plain numbers to arabic words language to use in calculator. So I customize my class and convert into plan arabic words without any Currency details.

You can see below screen shot is showing how to Convert to plain numbers to arabic words language. I use my same class to convert into Arabic words.



Here you can download the sample code:

https://docs.google.com/uc?id=0B5Aqxd0QER32VHRObGVIWGpkNzA&export=download


Wednesday, December 17, 2014

دل کے خوش رکھنے کو غالب یہ خیال اچّھا ہے​

حسنِ مہ گرچہ بہ ہنگامِ کمال اچّھا ہے
اس سے میرا مہِ خورشید جمال اچّھا ہے​

بوسہ دیتے نہیں اور دل پہ ہے ہر لحظہ نگاہ
جی میں کہتے ہیں کہ مفت آئے تو مال اچّھا ہے​

اور بازار سے لے آئے اگر ٹوٹ گیا
ساغرِ جم سے مرا جامِ سفال اچّھا ہے​

بے طلب دیں تو مزہ اس میں سوا ملتا ہے
وہ گدا جس کو نہ ہو خوئے سوال اچّھا ہے​

ان کے دیکھے سے جو آ جاتی ہے منہ پر رونق
وہ سمجھتے ہیں کہ بیمار کا حال اچّھا ہے​

دیکھیے پاتے ہیں عشّاق بتوں سے کیا فیض
اک برہمن نے کہا ہے کہ یہ سال اچّھا ہے​

ہم سخن تیشے نے فرہاد کو شیریں سے کیا
جس طرح کا کہ کسی میں ہو کمال اچّھا ہے​

قطرہ دریا میں جو مل جائے تو دریا ہو جائے
کام اچّھا ہے وہ، جس کا کہ مآل اچّھا ہے​

خضر سلطاں کو رکھے خالقِ اکبر سر سبز
شاہ کے باغ میں یہ تازہ نہال اچّھا ہے​

ہم کو معلوم ہے جنّت کی حقیقت لیکن
دل کے خوش رکھنے کو غالب یہ خیال اچّھا ہے​

Tuesday, December 16, 2014

Repeater Control example in asp.net

Introduction:

In this article I will explain what is repeater control, uses of repeater control and how to bind data to repeater control in asp.net.

Description:
 
In previous posts I explained many articles regarding Gridview, Ajax, JQuery and many more. Now I will explain about what is repeater control, uses of repeater control, bind data to repeater control in asp.net.
What is Repeater Control?
Repeater Control is a control which is used to display the repeated list of items
Uses of Repeater Control
Repeater Control is used to display repeated list of items that are bound to the control and it’s same as gridview and datagridview. Repeater control is lightweight and faster to display data when compared with gridview and datagrid. By using this control we can display data in custom format but it’s not possible in gridview or datagridview and it doesn’t support for paging and sorting. 
The Repeater control works by looping through the records in your data source and then repeating the rendering of it’s templates called item template. Repeater control contains different types of template fields those are
1) itemTemplate 2) AlternatingitemTemplate 3) HeaderTemplate 4) FooterTemplate
5) SeperatorTemplate
ItemTemplate: ItemTemplate defines how the each item is rendered from data source collection.

Monday, December 15, 2014

TRAVEL SOMEPLACE NEW EVERY YEAR

TRAVEL SOMEPLACE NEW EVERY YEAR

I love traveling, and would much rather spend money traveling than on a bunch of designer shoes and purses, or brand new car. so things like that are not at utter importance to me.
I could never find anyone to go with that was a) willing to pay, or b) liked to travel or c) both.
I google new good pleases to visit and make plans to go, visit holiday packages and plan myself.

Wednesday, December 10, 2014

خوابوں خیالوں کی دنیا سے الگ

خوابوں خیالوں کی دنیا سے الگ
REALLTY
میں کچھ چیزیں ہوتی ہیں جو ہم چاھتے ہویے بھی نہیں کر سکتے
کچھ چیزیں ہمارے ہاتھ میں ہوتی ہیں اور کچھ ہماری ہاتھ میں نہیں ہوتی
 

Saturday, November 29, 2014

انتظار تو شاید محبت کا نصیب ہے

انتظار تو شاید محبت کا نصیب ہے
لیکن .. جب  محبت  انتظار کراتی  ہے ، جسے زمیں روک جاتی ہے
سمے تھام جاتا ہے ، زمانے روک جاتے ہیں
 محبت زادی ہے
آخری سانس ، آخری دھڑکن ، آخری پل تک
انتظار کر سکتی ہے اور کبھی کبھی اس کے بعد بھی  


From , Album: Jab Javed Akhtar and Alka Yagnik.
What do you feel about such love ?

Tuesday, September 23, 2014

life incidents

Sometimes we ignore the small details out of a very big picture, but reality tells us that a very simple decision can change our life forever.. After all, what really matters most is that, it is you who will take all the consequences either good or bad.


Everyone is going to change. And through that change, you find out who your true friends are and who's going to turn and run away.


No matter how much it hurts now, someday you will look back and realize your struggles changed your life for the better.


People and circumstances change...accept it. You can only change what is in your power, what you have no control over...let it be...let it go...


Sometimes, change is too much to bear. But most of the time, change is the only thing saving your life.

If you're still looking for that one person who can change your life, take a look in the mirror!

Monday, September 22, 2014

miscalculation

But no matter how much planning you do, one tiny miscalculation, one moment of distraction, can end it all in an instant.

Wednesday, September 17, 2014

خواہش جنون

 اپنی کسی بھی خواہش کوکبھی بھی جنون مت بنانا۔ کیونکہ زندگی میں کچھ چیزیں ایسی ہوتی ہیں جو ہمیں کبھی نہیں مل سکتیں۔ چاہیں ہم روئیں چلّائیں یا بچوں کی طرح ایڑیاں رگڑیں، وہ کسئ دوسرے کے لئے ہوتی ہیں۔ مگر اس کا یہ مطلب نہیں کہ زندگی میں ہمارے لئے کچھ ہوتا ہی نہیں، کچھ نہ کچھ ہمارے لئے بھی ہوتا ہے۔

Monday, September 15, 2014

Here I am - this is me

Here I am - this is me
There's no where else on earth I'd rather be
Here I am - it's just me and you
And tonight we make our dreams come true

It's a new world - it's a new start
It's alive with the beating of young hearts
It's a new day - it's a new plan
I've been waiting for you
Here I am

Here we are - we've just begun
And after all this time - our time has come
Ya here we are - still goin' strong
Right here in the place where we belong

Here I am - next to you
And suddenly the world is all brand new
Here I am - where I'm gonna stay
Now there's nothin standin in our way
Here I am - this is me

 Bryan Adams

wаking uр in thе mid night

Тhе bеst fееling is when I wаking uр in thе middlе оf thе night аnd still hаving а соuрlе hоurs tо slеер.

Monday, September 01, 2014

Pakistani talent in form of legend singer, Mr. Habeeb wali Muhammad.

Habib Wali Mohammad 
Habib Wali Mohammad is a very senior and highly regarded Pakistani ghazal singer.

Habib Wali belongs to the Tabani family, an industrial house with large business holdings in Pakistan. (His brother Ashraf Tabani was governor of the province of Sindh around 1988.)

Born in 1921, he received his MBA from Syracuse University in 1947, and then lived in Bombay for about 10 years before moving to Pakistan. He is practically from the very second group of singers to ever record the art from and is still at his peak today. But probably because of his background and place as a member of a well-established family, Habib Wali has never pursued as aggressive and mainstream a career as a singer as others, though is still very highly regarded.

He is especially well known for singing famous ghazal of last Moghul Emperor Bahadur Shah Zafar, Lagta Nahin Hai Jee Mera Ujray Diyar Mein. Habib Wali Mohammad is a rare ghazal singer who managed to be a singer and a businessman.

Habib was born in Rangoon in 1921. His family name was Tabani, though he became famous as Habib Wali Mohammad. His family migrated to Bombay, where he took classical music lessons from Ustad Latafath Husain, nephew of Ustad Fayyaz Khan. But due to economic reasons, he gave priority to academics. His musical activities were limited to singing ghazals in college functions. After completing bachelors in Bombay, he studied for his MBA in USA. In mid forties he returned to Bombay.

In Bombay he participated in a large music competition, where he won the first prize. This propelled him to release his first album of ghazals. This record was to make him a celebrated singer. After partition, his family migrated to Pakistan and established an industrial group. He gave most of his time to the family business, recording ghazals and geet-s for films in his spare time. Concerts though were limited. In the eighties he released an album of ghazals composed by Nisar Bazmi.

He has been awarded the Nigar award. His famous ghazals include Bahadur Shah Zafar's Na kisi ki Aankh ka noor hoon and Qamar Jalalavi's Kab mera nasheman ahelay chaman. He is now retired and lives in California with his family.

His other well known ghazal includes "Aaj jane ki zidd na karo"

Na Kisi Ki Aankh Ka Noor Hoon - نہ کسی کی آنکھ کا نور ہوں



کلام : بہادر شاہ ظفر - گلوکار : محمد رفیع 


نہ کسی کی آنکھ کا نور ہوں نہ کسی کے دل کا قرار ہوں
جو کسی کے کام نہ آ سکے ميں وہ اِک مُشتِ غُبار ہوں

نہ تو ميں کسی کا حبيب ہوں نہ تو ميں کسی کا رقيب ہوں
جو بگڑ گيا وہ نصيب ہوں جو اُجڑ گيا وہ ديار ہوں

ميرا رنگ روپ بگڑ گيا ميرا يار مجھ سے بچھڑ گيا
جو چمن خزاں سے اُجڑ گيا ميں اُسی کی فصلِ بہار ہوں

پئے فاتحہ کوئی آئے کيوں کوئی چار پھول چڑھائے کيوں
کوئی آ کے شمع جلائے کيوں ميں وہ بيکسی کا مزار ہوں 



Poet: Bahadar Shah Zafar - Singer: Muhammad Rafi

ماں


ماں تیرا ہر لمس اور اس سے جڑی تیری خوشبو
اپنے وجود سے آتی ہے ہر لمحہ مجھے تیری خوشبو

دل کی یہ خواہش تھی کہ چاہے جائیں ہم

  
دل کی یہ خواہش تھی کہ چاہے جائیں ہم
یہ کب چاہ تھا کہ زندہ دفنائیں جائیں ہم

اب کی بار کچھ ایسے بھٹکے ہیں منزل سے
کس کو خبر کہ اس بار کہاں پائیں جائیں ہم

میرے دشمن لاکھ نفرتیں بھریں ذہنوں میں
رضائے الہی سے سب کے دلوں میں سمائے جائیں ہم

بڑے دکھ دیے ہیں سستی شہرت کے پجاریوں نے
فراخ دل ہیں اتنے کے مسکرائے جائیں ہم

ہے انکساری اپنی فطرت میں شامل اصغر
اسی لیے تو ہر دلعزیز کہلائے جائیں ہم

خوبصورت تو نہیں


کون اس سے مل کے پھر ملنے کی آرزو کرے
کون اس کو کھو کے اس کی یاد میں رویا کرے

کون اس کے حسن ادا پہ کئی غزلیں کہے
کون اس کی جستجو میں دو بدو پھرتا رہے

کون اس کی چاہتوں میں رات دن جاگا کئے
کون اس کے خواب کی امید پہ سویا کئے

کون اس کی یاد میں پہروں کہیں کھویا رہے
کون اس کا منتظر بیٹھا رہے اس سے گفتگو کرے

کون پاگل ہے جو اپنے وقت کو ضائع کرے
عظمٰی اتنی خوبصورت تو نہیں عظمٰی اتنی خوبصورت تو نہیں

کوئی پھر کیوں ایسی آرزو کرے کوئی پھر کیوں اس آرزو کرے
کون اس سے مل کے پھر ملنے کی آرزو کرے
کون اس کو کھو کے اس کی یاد میں رویا کرے

حسین خواب نگاہوں کو ڈھونڈتے آئے

(UA) Lahore
حسین خواب نگاہوں کو ڈھونڈتے آئے
کئی سراب نگاہوں کو ڈھونڈتے آئے

تو جس گلی سے گزرا تیرے پیچھے
یہ سب گلاب راہوں کو ڈھونڈتے آئے

کئی عشاق بےمراد تیرے در پہ جانے کیا
بصد آداب اداؤں میں ڈھونڈتے آئے

کہیں اماں نہ ملی جب دل بےچین کو تو
یہاں جناب پناہوں کو ڈھونڈتے آئے

جس میں زندگی کے راز درج ہوں عظمٰی
وہ ہم کتاب گداؤں میں ڈھونڈتے آئے

یوں تو خاموش ہو میں مگر


ہاں ! میں تجھے یاد کر رہی ہوں
بہا ، کر آنسو فریاد کر رہی ہوں

کہ ختم ہو جائے ہجرے شام
خدا سے دعا کر رہی ہوں

یوں تو خاموش ہو میں مگر
تنہائیوں میں تیرا زکر عام کر رہی ہوں

ساتھ ہو میرے تم ان لمحوں
سے التجا کر رہی ہوں

کہ ، نا تڑپاؤں پیارے لمحوں مجھے
میں بڑی شدیت سے تمہارا انتظار کر رہی ہوں

Kabhi Kisi Ko Mukammal Jahan Nahi Milta - کبھی کسی کو مکمل جہاں نہیں ملتا

ھی کسی کو مکمل جہاں نہیں ملتا
کہیں زمیں تو کہیں آسماں نہیں ملتا

جسے بھی دیکھئے وہ اپنے آپ میں گم ہے
زباں ملی ہے مگر ہم زبان نہیں ملتا

بجھا سکا ہے بھلا کون وقت کے شعلے
یہ ایسی آگ ہے جس میں دھواں نہیں ملتا

تیرے جہاں میں ایسا نہیں کہ پیار نہ ہو
جہاں امید ہو اس کی وہاں نہیں ملتا

کبھی کسی کو مکمل جہاں نہیں ملتا
کہیں زمیں تو کبھی آسماں نہیں ملتا

Sunday, August 31, 2014

اسپین میں مسلمانوں کے آخری مسلم حکمران

استرداد (ہسپانوی:Reconquista اور انگریزی: Reconquest) عیسائیوں کی ساڑھے سات سو سال طویل ان کوششوں کو کہا جاتا ہے جو انہوں نے جزیرہ نما آئبیریا سے مسلمانوں کو نکالنے اور ان کی حکومت کے خاتمے کے لئے کیں۔ 8 ویں صدی میں بنو امیہ کے ہاتھوں اسپین کی فتح کے بعد
استرداد کا آغاز 722ء میں معرکہ کوواڈونگا سے جبکہ اختتام 1492ء میں سقوط غرناطہ کے ساتھ ہوا۔

محمد بن الاحمر 1236ء میں کی زیر قیادت اسپین میں مسلمانوں کے آخری مضبوط گڑھ غرناطہ کو قشتالہ کے فرڈیننڈ سوم کے ہاتھوں شکست ہوئی اور غرناطہ اگلے 250 سالوں تک عیسائی سلطنت کا باجگذار بنا رہا۔ 2 جنوری 1492ء کو آخری مسلم حکمران ابو عبداللہ محمد نے فرڈیننڈ اور ملکہ آئزابیلا کے سامنے ہتھیار ڈال دیئے۔ جس کے نتیجے میں متحدہ رومن کیتھولک قوم وجود میں آئی۔
پرتگیزی استرداد 1249ء میں افونسو سوم کی جانب سے الغرب کی شکست کے ساتھ اختتام کو پہنچا۔

Mosque Córdoba - Catholic Church

 


 Abd al-Rahman decided to raise his great mosque. He offered to buy the church and the plot from the conquered people. The negotiations for the sale were placed in the hands of the Sultan's favourite secretary, Umeya ibn Yezid. Under the terms of the transfer, the Cordovese were permitted to reconstruct the church formerly dedicated to St Faustus, St Januarius, and St Marcellus, three Christian martyrs whom they deeply revered.[10]
Abd al-Rahman I allowed the Christians to rebuild their ruined churches and purchased the Christian half of the church of St Vincent.[11][12] The Caliph was rich. Apart from the treasure wrested from the Goths during the recent wars, he also extracted a tithe upon the produce of the land and on manufactures. Muslims in Andalusia were obliged to pay the tax of Zakah and a tax kown as Jizya was also laid upon every Christian and Jew in Andalusia in return they would receive a covenant of security from foreign invaders. Beyond this, the Moorish kings were greatly enriched by the acquisition of the valuable mines of Iberia, the quarries of marble, and other sources of wealth. From these revenues Abd al-Rahman and his successors, Hisham, Abd-erRahman II, the greatest of the dynasty and the third of the line, and lastly the extravagant Almanzor, lavished large sums upon the designing, construction, and costly adornment of the Mosque.[10] Abd al-Rahman I and his descendants reworked the building over the following two centuries to fashion it as a mosque, starting in 784. Additionally, Abd al-Rahman I used the mosque (originally called Aljama Mosque) as an adjunct to his palace and named it in honour of his wife. Traditionally, the mihrab (or apse) of a mosque faces in the direction of Mecca; by facing the mihrab, worshipers pray towards Mecca. Mecca is east-southeast of the mosque, but the mihrab of this mosque unusually points south.[13]
The work of building the resplendent Mezquita employed thousands of artisans and labourers, and such a vast undertaking led to the development of all the resources of the district. Hard stone and beautifully veined marbles were quarried from the Sierra Morena and the surrounding regions of the city. Metals of various kinds were dug from the soil, and factories sprang up in Cordova amid the stir and bustle of an awakened industrial energy. A famous Syrian architect made the plans for the Mosque. Leaving his own house on the edge of Cordoba, the Caliph came to reside in the city, so that he might personally superintend the operations and offer proposals for the improvement of the designs. Abd-er-Rahman moved about among the workers, directing them for several hours of every day.[10]
The mosque underwent numerous subsequent changes: Abd al-Rahman II ordered a new minaret, while in 961 Al-Hakam II enlarged the building and enriched the Mihrab. The last of such reforms was carried out by Al-Mansur Ibn Abi Aamir in 987. It was connected to the Caliph's palace by a raised walk-way, mosques within the palaces being the tradition for previous Islamic rulers - with Christian Kings following suit and building their palaces adjacent to churches. The Mezquita reached its current dimensions in 987 with the completion of the outer naves and courtyard.

المنقب میں نصب عبدالرحمن اول کا مجسمہ

The Reconquista 


This painting by Edwin Lord Weeks (circa 1880) depicts an old Moor preaching the holy war against the Christians at the mosque in Spain.The Walters Art Museum.
In 1236, Córdoba was conquered by King Ferdinand III of Castile, and the mosque was converted into a Catholic church in its centre. Alfonso X oversaw the construction of the Villaviciosa Chapel and the Royal Chapel within the mosque. The kings who followed added further Christian features, such as King Henry IIrebuilding the chapel in the 14th century. The minaret of the mosque was also converted to the bell tower of the cathedral. It was adorned with Santiago de Compostela’s captured cathedral bells. 
The most significant alteration was the building of a Renaissance cathedral nave in the middle of the expansive structure. The insertion was constructed by permission of El Libertador Charles V, king of Castile and Aragon. However, when Charles V visited the completed cathedral he was displeased by the result and famously commented, "they have taken something unique in all the world and destroyed it to build something you can find in any city." 
The mosque's reconversion to a Catholic church, may have helped to preserve it when the Spanish Inquisition was most active .Artisans and architects continued to add to the existing structure until the late 18th century.