How to consume an ASP.NET webpage in JavaScript?
Ever wondered how you can use your .net page to render output in javascript, something similar to Google Ads (Adsense)? What you want to do is have an ASP.NET page which does a bit of logic coded in C#VB.NET which other people can consume on their websites through a simple javascript call to your asp.net page. The solution is really easy - all you have to do is create your webpage as normal and stick your business logic inside it and then for the things your want to output, you ...
Problem with IFrame in a table
You must be wondering why would someone need an iframe within a table, right? Well, i had to consume an rss feeds within a Classic ASP application and the VB6 codes were not doing the job because the MSXML parser found errors in the XML document. Doing it in C# (asp.net) had no problems at all and because i had already waster more than 1 day trying all the different solutions i've googled, i thought it would be best to load the rss feeds in an iframe within the classic ...
Creating bookmarks with anchor tags
There are times when you need to create bookmarks within your webpage. A bookmark allows you to jump from one section of your webpage to another and is especially useful if you have a webpage which is long enough to make you scroll a lot. In these situations, you are better off creating bookmarks throughout the webpage so that don't need to scroll all the way down to find a particular subject of interest. The bookmark takes the form of an anchor tag as follows:
<a name="myBookmark">I am bookmarking this line</a>
And ...
Working with Excel and C#
I had the task of building a small app to re-order the tabs in a spreadsheet and get rid of those which are unnessary. However doing this in C# is surprisingly difficult mainly because the Microsoft.Office.Interop.Excel was intended to work primarily with VB/ VBA but was customised to work with C# as well. The task was really simple in terms of functionality as it would need to read an xml file which contained the required worksheets (tabs) in the order which we want them, so the app would need to ...
Cross threading problem with updating UI in WinForms
While trying to make a Windows application more responsive, i ended up cross threading, that is, i had one thread starting my application and another thread performing the work but trying to update the UI (a textbox) after the processing was done.
The solution is to call the Invoke method on the UI control as follows:
public delegate void UpdateTextboxHandler(string message);
private void UpdateTextbox(string message)
{
textBox1.Text += message;
}
private void Process_OnFinishProcessing(string message)
{
if (textBox1.InvokeRequired)
{
textBox1.Invoke(new UpdateTextboxHandler(UpdateTextbox), message);
}
else
{
textBox1.Text += message;
}
}
More information can be found on Multithreading with Windows Forms
Problem installing Sql Server 2005 on Vista Home Premium
So i decided to get Vista to take advantage of IIS 7 and i anticipated a few problems to get all my Windows XP programs to work properly, but i thought it would need maybe some Service Packs and i should get it all working. However when i tried to install Sql Server 2005 on Vista, the setup wizard warned me of two problems (one compatibility with this new version of windows and second the IIS thingy). I didn't care because at the end of the day, all i want ...
How to get rid a small bump on eyelid?
Small bumps on the eyelid are normally styes. A stye is like a pimple that can appear red and swollen and it is basically an inflamed oil gland on the edge of your eyelid. It is caused by bacteria on the skin that get into the hair follicle of the eyelash.
To get rid of the stye (small eye bump), apply warm compresses for 10 mins, 4 times a day. The stye should disappear within 2 days.
To avoid styes always wash your hands thoroughly before touching the skin around your eye!