Friday, March 30th 2007


The pain of goto statements in c#
posted @ 13:02 in [ asp dot net - geek ]

Here is another account of a very irritating experiance I had with the c# language. A guy from C really has to struggle with stupid non-geek compile errors. check this code. This was very correctly written for C. All i wanted to do was save my object code with duplicate code.

if (Request.QueryString[”CID”] != null)
CategoryID = Int32.Parse(Request.QueryString[”CID”].ToString());
else if(artwork_id>0)
{
CategoryID = Artwork.GetArtworkCategoryID(artwork_id);
    goto tr;
}
else
{
CategoryID = Artwork.GetCategoryID(ArtistID);
tr:
Server.Transfer(”work.aspx?AID=” + Request.QueryString[”AID”] +
“&CID=” +CategoryID + (debug?”&debug=true”:”"));
}

all that compiler said was  error CS0159: No such label ‘tr’ within the scope of the goto statement. I do understand that jumping to other code is to be done carefully.  you might skip some variable initialization or derive into some invalid stack. Having siad that, an average coder would know all that. Therefore, jumping to any code using goto should be very much allowed by default.




Tuesday, June 6th 2006


Could not access ‘CDO.Message’ - Fixture
posted @ 16:53 in [ asp dot net ]

want to share the fixture that troubled the code. what we found that the c:\inetpub\mailroot\pickup directory does not have write access to IUSR. The reason is that CDO directly writes the mail file to SMTP servers’s pickup directory. It is not opening port 25 and sending a proper mail. probably pickup is a monitored by SMTP server and on creation, it send the mail to the correct destination. Also, the pickup is automatic authorized. SMTP does not have to worry about access if it finds a file in pickup directory unlike becoming a relay over TCP socket.




Tuesday, May 9th 2006


name not a valid attribute in FORM
posted @ 17:26 in [ asp dot net ]

All runat-server forms come with thier own name. That is not permitted in the days of XHTML. How do you make it disappear is not possible at least in ASP.NET 1.x. VS 2005 and ASP.NET 2.x claims Conformance tags added in web.config files and should change the rendered HTML of .net controls.




Tuesday, May 9th 2006


paging is so nice/crap!
posted @ 12:24 in [ asp dot net ]

all paging controls in asp.net use post back. the controls come with a real heavy viewstate and with no url. no clue on how to share pages by email on such a environment. not like the developer is forced to use such choice but the power of defaults even applies here and that quietly affects the developer habits!




Monday, May 8th 2006


TABLES, XHTML, CSS and dot net
posted @ 11:40 in [ asp dot net ]

all the data grid controls that are called fantastic by developers using them are never given choice to use DIV based approach. those controls generate their own TABLE tags at all times with no choice of customizing. Look ma, how can i sit on a sofa and still make good websites!




Monday, May 1st 2006


FORM, default button, LABEL tag
posted @ 16:38 in [ asp dot net ]

We were taught about the action of pressing the return key (enter) in a text field and the form automatically getting submitted if it has a submit button somewhere. now, ASP.NET has rule number 1 thaty you cannot have more than one runat FORMs in the page. The developers with that tendency use the same form tag to do different actions at different parts of the page.

(more…)




Monday, May 1st 2006


how is that compiled code faster?
posted @ 13:58 in [ asp dot net ]

ASP.NET compilation feature has made it faster. compilation itself means different today. making a text program into a DLL which is still a pseudo code how come saves time? it saves time exactly where? not while compiling im sure. not while reloading it in IIS. not while executing. hello?
(more…)




Monday, May 1st 2006


POST everything, GET nothing
posted @ 13:43 in [ asp dot net ]

All forms are POSTing. and you are not allowed to think why. you are not even allowed to think where. just wave the magic runat and and the you will go blind. you will have no sence of when I need a POST and when I ned to GET. paginations, simple links, searching pages, even dumb buttons are POSTed. the judgement that we used to have on what METHOD i need on each type of form is faded away.

(more…)




Wednesday, March 22nd 2006


ASP dot NET cripples
posted @ 23:37 in [ Programming - asp dot net ]

a new category also created for all similar blog postings about asp dot net. Not that I only intend to point bad things in dot net. What is want to share is what I discover after more and more understanding of the asp dot net. The info is not claimed to be true in any way. It is my belief and I do not wish to impose it. Yes, I am open for the debade in this topic.