Uncategorized


when my erstwhile friend daniel first suggested that i should expatiate my views on the problems related with the evolving power of the computer and the concomitant ever increasing perception of the validity of it per se i thought that as a subject it w3aqs axiomatic as to answers that most reasonable people of a generation several ages before my own wherethe computer and the internet were as essential to the survival of a free and law abiding peoples where the brave new world of a sophistecated elite versed in the unequivical necessity of the computer by and large were inept and afraid to face life seen as ultimately rewarding only if virtual reality were the abiding absolute.what a crock of shit i thought;they justify their claims because it as pervasive state of the art technology is here to stayand i may be dumb but im not stupid and it becomes an ineluctable fact that the purpose ofthe computer is to help an increasingly fragile enviroment with faster and more sophisticated means to substantiate an ever stumbling homo sapiens as he lurches like some out of step dipsomaniac more akin to schadenfreude as society invertes on itself as the only cogent means to survive a world where acceptanceof its downward spiral towards the proverbial armageddon and we must make the imperitive of the cosmological essence of mankindes very existence as an emerging type two civilisation make any such argument as mine as out of step with reality as it is as,das ding an sich things as they are in themselves but has it not already made itself redundant by inextricably stating any situation as becoming as important as breathing and that as analogous to cyberspace and stating that without the computer and the net we are doomed to mediocrity and despair unless we do harness the very thing that will separate us from atavism and anomilies in the very structure that propels us towards an increasingly fragile view of ourselves as some how in anthropological terms at least as progressing forward in a benign spiritual quest to see ourselves as a forlorn but essential element in the knowledge of god like control over the cosmos;but the essence of the spurious but de riguer containment of duty to lead our more older and less enlightened older citizens like moses leading the israelites out of servititude but what has humanity learned about its structure vis a vis the soul or spirit as viewed by the buddhists of the hinayanna sect who understands that man and only man can solve the problem of life as illusion;

I was writing dynamic form variables to the page and i needed to retrieve their values when updated. When i tried to access the variables with request.params[] collection i noticed that the keys were what id i had given them with a string appended to the start. I wrote this function to easiliy access the variables:-

public static string PostVal(string key)
    {
        string retval = "";
        foreach (string s in HttpContext.Current.Request.Form.AllKeys)
        {
            string[] sr = s.Split('$');
            if (sr[sr.Length - 1] == key)
            {
                retval = HttpContext.Current.Request.Form[s];
            }
        }
        return retval;
    }

I was making a yearly calendar and i needed to output the cells to represent the days in the year. At first i just made a public variable, filled it up with html and then outputed it to the page like this:-

1
<%=variablename%>

This seemed to work well but the page didn’t update on postback methods because the html was being rendered before any methods were executing.
I figured there must be a way to output to the current page so i had a look around and found some code that updated a panel control. To send it raw html use this command:-

1
panMainCalendar.Controls.Add(new LiteralControl("<tr><td height='20'><div align='left'>"));

To add a control try this:-

1
2
3
4
5
6
7
8
Button NLab = new Button();
Unit NU = new Unit(100,UnitType.Percentage);
NLab.Width = NU;
NLab.Height = NU;
NLab.Click += Day_Click;
NLab.CssClass = "ButtonCell";
NLab.ID = "lbCell_"+Day + "_" + Month + "_" + Year;
panMainCalendar.Controls.Add(NLab);

Good Luck

We wanted to upgrade the usability of the new site we are developing, i have briefly seen info about the microsoft ajax extentions so i thought i would check it out. The main site is http://ajax.asp.net which has tutorials, articles and downloads. I downloaded the extensions for asp.net 2.0 and i also downloaded the toolkit. Now i had the code i thought i would upgrade one of my pages, i added the script manager and an update pane to one of my pages, in the script manager i set the property “Enable Partial Rendering” to true and then pressed play. The page loaded and when i clicked the submit button it submitted the form and updated the message label without reloading the page. Cool i thought this is going to be straight forward so i thought now i will check out the AJAX Toolkit. I unzipped the solution, loaded it into visual studio and pressed play. Well the build failed because the System.EnterpriseServices assembly wouldn’t load because it didn’t have the correct permissions. So off to google i went, after many unhelpful sites i figured it has something to do with the security levels in the web.config. So i updated the directive “trust” and set it to

<trust level=”Full”/>

I am not too experienced with windows permissions but i don’t think this is too unsafe. Anyway this got it working and i loaded the sample website. There seemed to be many cool controls and i worked out how i could use some of them in the current project. I added the tabs control without much drama but the autocomplete control is giving me trouble. What is cool about it is that it uses web services which i hadn’t done is asp.net before. They seem pretty straight forward which is great as we are going to be using them in the future. One thing i noticed about them is they don’t share the session from the ajax page accessing them.

Welcome to Developing ASP.

I have been developing dot net for about a year now, with many years experience with PHP/MySQL and for the last 3 months have been using ASP.Net. I like to give back to the community as most of my learning comes from what i can find on the web. So here we are with a site dedicated to learning ASP.Net. You can find some of previous work that i have done in PHP at http://www.developing-php.com. There is some javascript stuff there to.