Friday, July 16, 2010

Latest update after Swiss Bank has agreed to disclose the funds

Latest update after Swiss Bank has agreed to disclose the funds

Our Indians' Money - 70, 00,000 Crores Rupees In Swiss Bank

1) Yes, 70 lakhs crores rupees of India are lying in Switzerland banks. This is the highest amount lying outside any country, from amongst 180 countries of the world, as if India is the champion of Black Money.

2) Swiss Government has officially written to Indian Government that they are willing to inform the details of holders of 70 lakh crore rupees in their Banks, if Indian Government officially asks them.

3) On 22-5-08, this news has already been published in The Times of India and other Newspapers based on Swiss Government's official letter to Indian Government.

4) But the Indian Government has not sent any official enquiry to Switzerland for details of money which has been sent outside India between 1947 to 2008.. The opposition party is also equally not interested in doing so because most of the amount is owned by politicians and it is every Indian's money.

5) This money belongs to our country. From these funds we can repay 13 times of our country's foreign debt. The interest alone can take care of the Center s yearly budget. People need not pay any taxes and we can pay Rs. 1 lakh to each of 45 crore poor families.

6) Let us imagine, if Swiss Bank is holding Rs. 70 lakh Crores, then how much money is lying in other 69 Banks? How much they have deprived the Indian people? Just think, if the Account holder dies, the bank becomes the owner of the funds in his account.

7) Are these people totally ignorant about the philosophy of Karma? What will this ill-gotten wealth do to them and their families when they own/use such money, generated out of corruption and exploitation?

8) Indian people have read and have known about these facts. But the helpless people have neither time nor inclination to do anything in the matter. This is like "a new freedom struggle" and we will have to fight this.

9) This money is the result of our sweat and blood.. The wealth generated and earned after putting in lots of mental and physical efforts by Indian people must be brought back to our country.


10) As a service to our motherland and your contribution to this struggle, please circulate at least few copies of this note amongst your friends and relatives and convert it into a mass movement.



Regards
Ashok

Saturday, March 20, 2010

Get control Id in javascript

We have many times faced the issue of knowing the client id of the control in javascript...well, if you use javascript within an aspx / ascx page you can use the following to get the client ID of the control



alert(document.getElementByID('<%=txtDemo.ClientID %>'));


in fact you can do a lot more than get your control client ID, you can do code with in the <% %> tags. These are called server tags, the code written within these tags is run on the server and the corresponding values are placed. For ex. if you want to get the username in stored in the session,
you can use

var userName = '<%= Session["userName"].ToString() %>';

the <%= %> defines the assignment, tells the server that the values generated should be placed at the same location.

<%# %> this tag is used for binding data in in repeater, datagrid etc...

Tuesday, September 15, 2009

How to know if your code is run by the visual studio designer?

While developing a windows application in .net (using c# or VB) we generally use the design view to add and position controls, thanks to the great interface provided by Microsoft.

But many a times while working with custom controls or user controls, you may want the designer to behave in a different way in the design view than while running the application.

For example, say that you have created a custom control extending System.Windows.Forms.Button control to MyButton and specifying that all the buttons created using this class must have same background and same image.

Now say that you a created a from with 100 buttons created using the MyButton class. The design view would take a lot of time to load the 100 buttons and their corresponding images.

As you have created buttons from the MyButton class, you already know the image that would be set and the background color. So you always need not have both the image and the background color set while designing the form, this can be done in the runtime , so that your designer would load quickly.

The .NET framework provides a way to do this. The System.Windows.Forms.Control has a property "DesignMode", this property tells us if the control is in design mode or is in runtime.

But this property may not always be accurate. While using custom controls, this property may not behave as expected.

So how do we actually know if the code is running in Visual Studio or is in runtime?

I stumped over an idea that the base process for the design to be displayed should be visual studio, so a conditional statement can be used to check if the current process is visual studio. This can be done by using the System.Diagnostics.Process.GetCurrentProcess.ProcessName, this property gives the name of the current running process. This can be checked with the visual studio process name ( which is devenv).

So we can check if the code is being run by visual studio designer or by the application by using the following code:

VB:

if System.Diagnostics.Process.GetCurrentProcess.ProcessName <> "devenv" then
' code if not run in visual studio
else
' code when run in visual studio.
end if

c#
if(System.Diagnostics.Process.GetCurrentProcess.ProcessName != "devenv")
{
// code if not run in visual studio
}
else
{
// code if run in visual studio.
}



Hope this helps.

Saturday, August 29, 2009

ClickOnce Deployment of windows applications

Hi Geeks,
 
Today I was able to implement ClickOnce deployment of windows applications, and thought it would be helpful if I blog this. Wondering what is ClickOnce, well it cannot be told in a single word.
 
Ever came across a situation in which you had to manually install application in each and every node of a network? It is acceptable when the nodes are limited say around 5 - 10 nodes. But imagine a network having 50 or 100 nodes, located on different floors or even different buildings, and you need to install the application manually in each and every node, and you need to install in each and every node for every change ( either minor or major ) you have made to the application. 
To move around installing the application itself is tiring. Wouldn’t it be nice if we change something on the server and it reflects on all nodes? 
This can be achieved using ClickOnce deployment. ClickOnce deployment is, as the name suggests click once to publish the application and whoever is using the application get the newly published version automatically.
Anyway coming back to clickonce, I did not explore completely, so spare me if I am wrong anywhere. I am just putting the steps I have taken to implement ClickOnce.
 
Open the project properties and select Debug tab. In this make sure that the Configuration is set to Release or Active (Release), and Platform to Any CPU.
 
Now go to the Signing tab and check the Sign the ClickOnce manifests checkbox. You can sign the assembly if you desire.
 
Then go to security tab and check “This is a Full Trust Application.”
 
Then go to publish tab. In this you need to specify
•    publish path / location
•    installation URL ( optional )
•    Install Mode and Settings
•    Application Files
•    Prerequisites
•    Updates
•    Options
•    Publish version
 
Let’s go one at a time now.

Publish path / Location:
This is the location where the application is published, i.e. a setup file is created.
This is also the location where a client checks for updates.
 
Installation URL (optional)
This can be understood by seeing the publish screen
Install Mode and Settings:
Select the desired option, but I recommend to make the application available both offline and online.

Application Files:
Here we need to remember that the Application.ExecutablePath is neither \bin\debug or \bin\release, its always the root directory, so place any dependent files from debug \ release in the root directory.
Click on Application Files button and you can see the list of all the files that would be published.
Verify that all the files required are present in the list. If you know that some are not needed then you can exclude them by selection from the combobox.

Prerequisites:
Make sure all the necessary Prerequisites are checked, i.e. if your application uses crystal reports make sure Crystal reports is checked.

Updates:
The updates screen is self explanatory.
I would recommend to you to select before the application starts radio button.

Publish Version:
Make sure that Automatically increment revision with each publish is checked.
 
Now click on publish button, and you should be done.
 
Once you install the application from the publish location on every node, it will automatically check for updates from the publish location every time the application starts.
 
Hope I have covered everything. Please tell me if I missed out anything.
Happy publishing

Friday, August 28, 2009

My First Post

Hi all,

This is my first blog, and I have started blogging today. Watch out this space for my interests in Web  and other technologies. Will definitely keep in touch and will post as regularly as possible.