Archives
-
Fragmented disk
I develop my projects on a brand new high specs laptop that I have since one month.
Finding it now very slow, I checked it with Norton Speed Disk, and guess what, 72 % of fragmented data !!
For me this is a record. It seems that most of the fragmented files are MSDN or Visula cache stuff.
I wonder what I am going to discover on my production server ;-) -
Default button
I was looking for a solution to this issue:
How to assign a button to the Enter key ?
Well thanks to usergroup list, this one come very handy.
http://www.metabuilders.com/Tools/DefaultButtons.aspx -
Cookies... Eat me
Response.Cookies("MyCookie").Expires = DateTime.Now.AddDays(-30)
Great, it works but not immediatly. So I suggest that you write again the cookie with empty values to really empty the cookie before it disappear.
I had to do that because the clipboard function I use is a panel visible or not.
So if I delete the cookie, and the user make visible the clipboard very quickly, the cookies values are still there. Emptied it solved the problem, well for me. -
Mmmm ... Cookies
To be honest, I didn't used really cookies on a project since a very long time, but in Scoilnet, the education portal I am building for the Irish government,
here we go, I need it.
I had to implement a neat feature to let users, mostly teachers, keeping in a 'clipboard' some resources(HTML documents) for a certain period of time.
And indeed retrieve the content of their clipboard when they need it, today or in 10 days. Add to these requirements that they don't login to access the site, and., correct me if I am wrong, cookies ready to cook !
I remember vaguely that cookies implementation before was a piece of cake (sorry I couldn't missed this one;-)), so because .Net rocks, it would be easy.
Not so easy, indeed. It took me few hours to figure out how to make this working properly.
I discovered that when you write some values to a cookie, you need to check if the cookie exist to avoid an exception error.
Great, but when you write something like if request.cookies("Mycookie") is nothing then... you enter in a mysterious world.
To be more explicit, you have with .Net 2 types of cookies, the session one, and the persistent one. The first disappear when the user do the same, and the second stay on the user disk. The difference is just a tiny property Expires. If you pass to this an expiration date, it's persistent, otherwise not.
The problem, is when you do a test to check that the cookie is there, .Net for a reason which elude me, create the cookie, but with a null expiration date.
Yes you just guessed it, it's a session cookie. And now everything you can write in your cookie after that are not written to the disk, believe me I spend sometime to discover this.
In some scenario, it could be worse, if you use a watch in VS.Net, you create again this fugitive cookie.
The incoming (Request) cookie carries an Expires date of DateTime.MinValue, regardless of the date attached to the cookie on the client system.
Read this clever article on CodeProject to know more about this problem and a solution.
So my little solution is this one, I admit unclean, but unfortunatly not too much time. I am sure someone has a better explanation, but cookies and .Net are not the best ingredients for a good recipe. -
GeoBlog
Hey Christophe, this Geoblog stuff is pretty cool.
I just wonder what's going to happen in case of success. It could be a little bit messy all this blogs popup from everywhere.
But it's really a feature to learn about the real world linked to the superficial world of Internet !
I like this idea of global Cafe du Commerce, with everybody talking about everything. -
En attendant Bill
Julie replied to my comment on Bill blog:
So Paschal. If you refer to Bill Gates as God, then who are you referring to here as Jesus?
Nice one Julie. Of course I can say Scott for opening our can of blogs, but it was more something like Jeez ! -
Apple enter the music business
-
Web deployment
My project Scoilnet start now to be big, and I am confronted now with deployment issues.
I setup the firewall to let only port 80 connections accepted, so obviously I can't use any FTP upload.
I would like now to deploy only certain files and not as I am doing now, all the project.
I found the deployment with VS very handy, but is it possible to copy only certain files ?
I know already I can exclude from my project the files I don't want to copy, but now that seems impossible regarding the size of the solution.
Any idea about an add-in to do that ? -
En attendant Bill
-
wbloggar
Roy, to write your blogs which one you prefer , this one or this one ;-))
-
Imagine Cup 2
Ok, now onto my second day at Microsoft. BTW, this was on Saturday. This was the day of the US Finals judging for the Imagine Cup 2003.
-
ASP.NET Authentication Question
Roy wrote:
-
Interesting !
For whoever read my last blog about a new feature in .Net 1.1, this is now to behave like a 'serious' issue.
I was reading Brad Adams and Darren Neimke give this comment:
NB: Interesting exception thrown when I tried to enter the "< NOSPAM >" in the e-mail address for this message. Remove the spaces between the angle brackets and the NOSPAM word to see the effect!
Obviously I tried it and it give me the same exception message that I mentioned.
Imagine this happens to our gurus ;-) More seriously is somebody from the .Net team can give a better alternative than the one proposed.
I repeat I like this feature, but I dislike the way it was implemented. -
Validation request in .Net 1.1
I think this can be useful for everybody who can have this problem with .Net 1.1.
I break a little project I run on one of my servers, just by installing .Net 1.1 instead of the 1.0, because this happened.
I generated a database of usernames and password to provide an access for a vote section in this project.
What I didn't know with .Net 1.1, is that the team added a new feature about request validation.
So now if your user submit some specific characters like the one which can be interpreted as script functions, and submit the form, you might finish with a superb new error message like this :
A potentially dangerous Request.form value was detected from the client.
I am not complaining about this, I think it's a great security feature.
Unfortunatly my password list contains some characters interpreted as tags part like < or >.
However, the solution provided to this issue don't make me fully happy.
What you can do is to disable this new feature by adding this in your Page directive line:
<%@ Page validateRequest="false" % > -
ASP.NET hosting
Fabrice I can help, I have my own hosting platform. Well the only restriction could be the traffic ;-)
By the way, I think I read some time ago in this very blog space, that someone know another free hosting solution.
I can't find anymore the details but I will let you know if I find it again. -
Wrox
Mads Haugbø Nissen wrote:
-
Breadcrumbs code
I am looking for an easy to implement breadcrumbs code for my project Scoilnet (VB if possible, C# is ok).
I already code one but not totally happy with it, too much links hard-coded.
What is also the best ? Having the links in a database, an xml file, or static links.
I would like to have something like:
Home / My Level 1 / My Level 2
Thanks for any help ! -
Back button and .Net
I have a good question here and I need some help. No idea if this is possible.
Imagine this scenario: you go from a web page A to a page B by a click.
OK. now I have on the page B some buttons to trigger some decorations changes on the page B, like having the text in three columns, the font size, etc...
But of course, because of the server-side effect, the history include these changes.
So now this is the challenge. How can I use the Back button of the browser and back automatically to the A page and not to the cache version of the modified page B.
I can't think about disable viewstate because I need it to maintain some infos on the page.
Maybe the cache ?!?
My two cents on that will be probably to use the Javascript function History(), but not totally sure about that.
I am sure that this is a task a lot of people would like to be solve.
Any idea? -
Thanks guys...
Hey man, when are you going to leave me alone with your bazaar rhetoric and realise that you not offend me at all, but certainly a lot of people there who want just to read .Net stories and subjects related to technology and nothing else.
Glad to see that you understand finally that your stuff has to be store in the backyard, not anymore posted on the front door !
So thanks now to stop using my name everytime you start ranting, saying something like 'sorry if what follow going to offend Paschal'! -
Stripping HTML tags
-
asp.netPRO Cover Article and SmartNavigation
Don XML, yes I read the article and I am totally agree that SmartNavigations don't work.
But what's about .Net 1.1 ? Is it something related or not ? -
Irrational behavior
Tim you are perfectly right. I am fed up that people launch freely on th e web some rants about some patriotic thoughts.
Just talking for myself, I am not a patriot of any country. I am not for the war, I am not against either, but I have enough of people who can critics me easily because I have a french name.
I am not living in france for this reason: too much patriots over there and too much politics !
Developer is my only flag ;-) -
Mono news
If you have interest in Mono project, this is quite some good news.
the Mono project has now a community for developers who want to run .Net with Linux:
GotMono
It seems also that their next goal is to make Sharpdevelop Editor running under Linux ! good luck to them -
Stripping out HTML tags
This blog is amazing to find solutions. I enjoy to be part of this community.
Well another idea on removing HTML tags from Christian Dehaeseleer:
" If your HTML is not "simple" then RegEx will not work... (what if your HTML contains "<" etc.).
Another option is to parse your HTML as XML with SgmlReader (available on GotDotNet) and then treat the XML as you wish (for instance using a default XSL Template will remove all tags...) "
Hey folks, what do you think about this versus using Regex. -
Search in dotnetweblogs
-
Search in dotnetweblogs
-
Web controls list
From Martin -
Stripping out HTML tags
Thanks Phil for your suggestion, I will try this:
Here's how I do it (the variable 'HTML' is a String containing the HTML code):
Dim regEx As New Regex("<[^>]+>")
Dim Text As String = regEx.Replace(HTML, "") -
An Aging Workforce Needs Accessible Technology
I am starting this week my implementation of Accessibility in Scoilnet project.
I read this excellent study on Only 4 gurus , which prove that it's not only an issue for disability but for a growing part of the population.
By the way Only 4 gurus is a really nice site, so keep it in your favorites :-) -
An Aging Workforce Needs Accessible Technology
I am starting this week my implementation of Accessibility in Scoilnet project.
I read this excellent study on Only 4 gurus , which prove that it's not only an issue for disability but for a growing part of the population.
By the way Only 4 gurus is a really nice site, so keep it in your favorites :-) -
Transcriber 1.51 for Pocket PC
Microsoft Transcriber is an award winning application that uses proprietary Transcriber technology to bring you unprecedented recognition accuracy and ease of use to your Pocket PC. Transcriber lets you take down a phone number, take notes and more, just as easily as writing on a piece of paper.
You can download the new version here -
Transcriber 1.51 for Pocket PC
Microsoft Transcriber is an award winning application that uses proprietary Transcriber technology to bring you unprecedented recognition accuracy and ease of use to your Pocket PC. Transcriber lets you take down a phone number, take notes and more, just as easily as writing on a piece of paper.
You can download the new version here -
Web Controls
I would like to share a list of real useful third party webcontrols.
Why? Because there are so many controls on the market actually and it's hard to find the best one.
What I would like to see is not an exhaustive list of controls but more what developers use, and sort this list by true ratings based on your experience.
So if it's working well, I will organise a list like Fabrice did for the tools.
I would like to start by two types of controls I use a lot.
- Menu Control
- ASP.Net menus Coalesys
I like this one, the only issue I have is that it's quite hard to setup.
- Text Editor
Rich Text box RichTextbox
Probably the most complete and easy to use -
Stripping out HTML tags
Is somebody know the best way to remove HTML tags from a parsed document ?
I tried Regs expression but not so conclusive. -
Rollover user control
Another good article from Chris Garrett about reusable rollover javascript function and images.
The only thing missing is a preload images function, but this shouldn't be a problem to implement. -
MSDN and VS 2003
I have now VS 2003 installed. Slow download but cool installation, and it's really worth it !
Something not clear by the way. Do I need to download the 3 MSDN CD images,
or can I use my actual MSDN Cds plus the April 2003 shipment ? -
Split() function in SQL 2000
Few days ago, I finish a small .Net project, where I have to manage a survey for schools with dozens of dozens of web controls like textboxes, checkboxes, radiobuttons, etc...
The performance of the application was quite good, but saving data in SQL appear to be a disaster.
Very slow, so obviously a lot of Timeout errors. I tried everything, like increasing the running time for my application, or doing some code optimisation. Not really successful.
So I came to the idea of doing the most of the job on the SQL side. What I did is to send an all 'blob' of information to a stored procedure, including questions id and answers, and asked to SQL to split the data in a suitable way and store it.
Well the only problem is that in SQL you don't have any Split() function like in VB.
So I wrote my own function and it works so well, that I would like to share the function.
Notice: you have to create this as a User Defined function and not as a normal stored procedure.
CREATE FUNCTION Piece ( @CharacterExpression VARCHAR(8000), @Delimiter CHAR(1), @Position INTEGER) -
Aspnetweblog and .Netweblog future
I just finish to read the mail from Scott about the future of this community.
I agreed with Paul Gielens about creating groups. I find that as the opposite of the idea of a community.
I like the randomness of the different posts, meanwhile some posts are really out of .Net topic.
If we put people in categories, it's for me like going back to a kind of discussion forum where you enter in a thread only if you find the thread.
Doing like that, I believe that gurus will communicate only for gurus, and the same for web developers.
Since I have this blog opened, I learn a lot from everybody.
For me the most important thing missing is a Search function through all the 3500 posts.
A large amount of code is already there, and it's quite hard to find it. Or a link to an article deeply buried in some guy's blog. -
No comment
No don't expect me to comment the crap from Robert
We have in french a word for this junk : lamentable ! -
Help With London's Congestion Charging
This software is very useful when you commute in London.
In an attempt to reduce traffic congestion, the city of London recently began charging commuters a special tax whenever they drive into the downtown area. If you deliberately venture into the downtown zone, the so-called "Congestion Charge" can be paid via SMS. But, how can you be sure just where the "free" and "taxed" roadways are?
Now the latest versio of Tube map software from Visual IT let you know the details by a clear map of the city centre. -
HP, Dell developing Microsoft Smartphones
Read on Pocketpcthoughts
"Both Dell and Hewlett Packard appear to be making forays into the Microsoft Smartphone arena. A report said that both companies have asked a number of Taiwanese manufacturers to give them quotes for phones, said Digitimes. Those include HTC – which makes the Orange slow booter, Mitac, Compal, Asustek, Quanta and Inventec, the newspaper claimed. But it's unclear whether these companies would accept quotations to make Smartphones, given the low price tag on these devices." -
Logging Errors Automatically in Your ASP.NET Application
I read this article from Russ Nemhauser on Dotnetjunkies.
If you have access to an SMTP server, I found this very useful to send back to yourself errors that users might discover in your application, maybe few months after finishing a project.
It's so human to make errors ;-) -
Pictures of the first phone watch
Useful for the next James Bond ! -
Visual Studio .NET 2003 Beta (English Version) disappeared
Apparantly, Visual Studio .NET 2003 Beta (English Version) disappeared from the MSDN subscriber section. A release is eminent.
Yves Reynhout
Yes but Visual Studio .NET 2003 Enterprise Architect Beta 1 - CD1 is still there ...
but the Japanese version ;-)) -
Third party WebControls list
I would like to share a list of real useful third party webcontrols.
Why? Because there are so many controls on the market actually and it's hard to find the best one.
What I would like to see is not an exhaustive list of controls but more what developers use, and sort this list by true ratings based on your experience.
So if it's working well, I will organise a list like Fabrice did for the tools.
I would like to start by two types of controls I use a lot.
- Menu Control
- ASP.Net menus Coalesys
I like this one, the only issue I have is that it's quite hard to setup.
- Text Editor
Rich Text box RichTextbox
Probably the most complete and easy to use -
Fun site for the afternoon
From The Four Word Film review :
-
Viewstate(2)
"After postback, the values will be there still, unless ViewState is explicitly disabled by the user. This is the way all the .NET WebControls work (try setting the text of a control in onload when !IsPostBack and notice how it will retain its value for the lifetime of the page, even though you never explicitly set it again).
-
Cell phones mark 30th birthday
First call was April 30, 1973, on a Manhattan street corner
Read from Knoxnews.com
This is cool but what's amazed me in this story is that apparently Martin Cooper is still working on some innovative products, and he's 74 !
Well done Martin, I would like to be so healthy at this age, but not sure to live so long ;-) -
Viewstate
Your answer is in the first part of your post. You create a public property which gets and sets the value inside of the viewstate:
-
Just so you know
Robert wrote:
In case you haven't seen the news yet, we've begun a significant incursion into Baghdad. It is 10:12PM MST, 9:12AM in Baghdad Time. We have now taken over the Ministry of [Dis]-Information, and at least one presidential palace. Check out MSNBC for more info. Just thought I'd give you guys a heads-up.
Hey man I didn't know you were there. The WE is a bit too much no ? This is not a painting-ball game :-((.
Very sad to read some bullshit like that ! -
New watch but with 256 Mb of memory
Allied Data’s retail division TORNADO continues expanding its product portfolio. Tornado will soon introduce its latest ultra portable solution: the Tornado USB Memory Watch (UMW). The Tornado UMW is a stylish designed wristwatch with built-in memory capacity.
The Tornado USB Memory Watch (UMW) is the easy way to store, transfer and carry your personal files. The Tornado UMW is a portable storage device built into a stylish designed wristwatch. This portable device can store personal computer data files, image files e.g. photo, video- and audio files without using floppy discs or CDs. Whether you're at home, at work, or on the road, the Tornado UMW gives you instant access to your files.
The Tornado UMW is available as a men’s watch and comes out in 3 different versions: with 64, 128 or 256 MB memory. The Tornado UMW is safe in use because documents can be stored in public or secure data sectors with password-protection. With the USB cable, the Tornado UMW can be plugged directly in every industry-standard USB 1.1 port that is built into desktop PCs including Apple Mac, notebooks or PDA. The Tornado UMW supports Windows CE, 98SE, 2000, ME, XP, Linux 2.4 or higher, Mac OS 8.6 or higher. -
Dropdown list
I discover what appears to be a bug with the dropdownlist control.
I create a dropdown list containig items and grouped bys sections like this :
Of course using a server side control. Everything fine, but the problems are in the code.
The control is bind with some data. Each of the subtitle contains a null value, and the Topic items contains their own id.
I use an event on the onchange of the select control. when the event is fired, I use the selectedindex property to detect if I select a subtitle (just there for decoration), or a topic.
For the Topic, no problem, everything is ok, but for the subtitle, what I wanted is to select the next Topic automatically after the subtitle.
For example, if I select Energy I want to go tot the Topic 1, or if I choose the line over Energy, I jump to Topic1.
Piece of cake? Not exactly because whatever I tried so far, the selectedindex of my elements were back with a value of 0 or 1, if I didn't choose a Topic.
Pushing further my tests, I discover what seem to be the origin of the problem.
If you don't have any value in a item in a dropdownlist, the selectedindex is always the first element matching the search.
I don't remember this kind of behavior before with ASP and Javascript.
For me selectedindex should return an integer, whatever the value of the item.
So for me the solution was to include some dummy unique values for each of the Subtitles in my dropdown control, and using indexof, to make the difference between different items. -
Viewstate turn me really nuts !
-
Project update
The development of the project Scoilnet, portal for Irish Education, is going well.
We're going to have a user testing phase next week, mostly schools.
So the pressure is on me actually !
I still have a couple of pages to finish before Friday, so it's going to be tough.
Something give me some headache today, and I found another way to do it, but it's apity I couldn't figure out how to do it the proper way.
My issue was to pass a value between two controls in the same event cycle.
I tried to use a viewstate but apparently it didn't worked, couldn't read the value from the second control.
I read somewhere tht I could use Saveviewstate method but didn't found the right syntax.
It works now by doing something totally different: affecting the value needed inside the second control before passing the result to the next page using http context and server transfer.
But I am still opened to any suggestion !
-
Important question...well maybe for some like me about Wrox
Ok folks have a look at AspToday (site linked to Wrox).
Apparently the homw page is still there but nothing work anymore behind, dead, absolutly dead :-(
Few days ago I was still able to login but now it's really gone !
So my question now is :
What's going to happen to the HUGE resources library that this site have since more than 3 years ?
CSharptoday is worst, nothing at all, no more homepage, site close !
Any idea about their content, because I was a register user, who paid for their resources and now what can I do if I want to access to some resource from their site ??
The money is not an issue there, but if they are close for good shouldn't be able to publish their site as an open public resource ? -
Boy, am I glad to see you!
Welcome Dana.
I enjoyed your site aspforblondes ;-)
Very refreshing. Like this last one:
Today I heard birds chirping outside my window at sunrise... BIRDS Y`LL!!! The birdies are back and it was in the 60`s yesterday (F) !!!!!!! Spring is on the way - I can jsut FEEL it! I`m still working hard although I LOATHE being locked in this windowless offie all day with nobody to talk to. Y`all send me some email or something!
By the way, we need to have more girls in our .Net world. I am totally agree with Christopher Frazier when he say:
Amen! More smart females, please! Blonde or not...whateva.
I add to that that we need to have more funny names for our .net or asp websites.
Man , girls are so good for that, aspforblondes, datagridgirl.
Do you know some more like this? Imagine Aspfortruckers, Aspfordiscodude, AspforIwishIwasrich, Aspforpensioneers !