Monday, May 26, 2008

The Enchantress of Florence: Salman Rushdie

Enchantress of Florence

I was told to be wary before picking up a Rushdie book because Rushdie’s works are normally considered very heavy, with challenging prose and long sentences. My friends told me to read one only if I was okay with spending a lot of time with the book. I remembered seeing Rushdie's interview on television several weeks ago when he spoke of his latest novel. He was talking about Jodha being an imaginary character in Mughal history. At that time I did understand the relevance of his statements. I thought it was probably because of the ongoing controversy about Jodhaa-Akbar: the movie.

Half of the story is based in the time of "Akbar the Greatest", in the city of victory – Sikri, while the other half is based in Renaissance Florence - the time of Niccolo Machiavelli. The story is about a lost Mughal princess: an enchantress who is the common thread between these different worlds. Magic and enchantments have a special place in this story and they have been treated very differently from other books based on magic. This is not fantasy fiction. It is historical fiction; in spite of the heavy concentration of enchantments throughout the story. The characters we meet include the Navratnas in akbar's court: Abul Fazl, Birbal, Tansen and the others. Then there is Salim, Badauni and the like.

The character of Queen Jodha is particularly enigmatic because of the magical character ascribed to her. Rushdie does not explain Jodha's character; he leaves it to the reader's imagination. She could either be a product of collective schizophrenia at the insistence of the Emperor’s will; or as a product of the amazing creative powers of the Emperor: The Shelter of the World, the Invincible.

Truly, the character of Akbar is grand. I always admired Akbar as a great king; the grand unifier of Hindoostan, but never before had I imagined his character as he has been shown in this book. From Rushdie's descriptions, you can truly feel the awesome power vested in this man. He is the omnipotent emperor: the man who has the power to do absolutely anything in the world. He can conquer the world; He can bring the perfect woman of his dreams to life from a mere fantasy.

In the other part of the world we have Nicollo Machiavelli and his two friends growing up as young boys in Florence. There are glimpses of Girolamo Savonarola's weepers, whose doctrines are put to end in a blazing fire quite like the "bonfire of vanities”, practised by him and his followers. Only in this case it was Savonarola and his followers who were roasted in the fire. The story traces the fall of the Medici, the creation of the republic, the return of the Medici, the troubled times of Europe, Popes indulging in warmongering etc.

Rushdie's command over the English language is staggering. The prose is convoluted at times, which is quite a characteristic of his writing, but this is certainly not at the expense of readability. Although I took a little more time on this book than others of the same length, I did not quite realize it till I finished the book and sat down to write a review.

A celebration of creative writing. Recommended reading.

Monday, May 05, 2008

Styles on the Login.aspx page

I have been playing around with the ASP.NET login controls lately. After getting the membership and role management framework to work on my website (which is quite a task in itself), I set to figure out some other small things. In this case, I wanted to apply custom styles to the login control on my Login.aspx page.

Doing this is as simple as assigning a class to the CssClass attribute of the Login control and to any sub-controls whose appearance you want to modify.

<body class="Body">

<form id="form1" runat="server">

<div>

<asp:Login ID="Login1" runat="server" CssClass="TextBox">

<LoginButtonStyle CssClass="Button" />

</asp:Login>

</div>

</form>

</body>

</html>

Now I should mention that these classes are contained in a .css file inside my App_Themes/Default/Styles folder.

So in the <head> section of the page, I added the following:

<link rel="stylesheet" type="text/css" href="../App_Themes/Default/Styles/LoginStyles.css" />

Simple enough eh? Wrong!

No matter what I tried, no matter how much I played with the path to the css file, the styles simply won’t be rendered on my page. The same styles get applied if you use them in a <style /> element in the page itself. I was flummoxed.

The thing to note here is that the authorization section in my website is configured as:

<authorization>

<deny users="?"/>

</authorization>

This means that unauthenticated users will not be able to access the website resources: which includes style sheets and/or images on the website!!

So, in order to get this to work, I had to move the stylesheets for the login page and the related images to a separate folder called “AllowAll” and make the following additions to my web.config file:

<location path="AllowAll">

<system.web>

<authorization>

<allow users="*"/>

</authorization>

</system.web>

</location>

Basically this section means that all users (*) should be allowed access inside the “AllowAll” folder, regardless of whether they are authenticated or not.

Then I simply changed the path to my stylesheet on the login.aspx page:

<link rel="stylesheet" type="text/css" href="AllowAll/LoginStyles.css" />

And that did the trick. Woof…so much for authorization!!