Tuesday, November 20, 2012

Asp.net validations not working after publishing my website on iis



Hello folks,

This time i'm here with a very common problem faced by Asp.Net developers i.e 
asp.net validations work fine while running the application in visual studio env, but when the same application is deployed on iis these asp.net validations doesn't work.

This problem may be because of two reasons, either aspnet_regiis.exe is corrupted or java script is disabled on the browser, it  can be addressed by following:

1. Go to C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319( this 4_0_30319 varies depending on the version of .net) check for the file "WebUIValindation.js" if it does not exist, go to command prompt and map to the directory where .net framework is installed. (C:\windows\Microsoft.NET\Framework64\v4.0.30319) and type aspnet_regiis.exe -i 

2. Check weather java-script is enabled on the browser, Open IE settings(screw symbol), internet options, security, custom level and enable java script if it is not enabled. 

by this validation should work in your application

Cheers,
UV.



Read more! Read more: http://www.blogdoctor.me/2007/02/expandable-post-summaries.html#ixzz2CqUkfMpH Read more: http://www.blogdoctor.me/2007/02/expandable-post-summaries.html#ixzz2CqUBCb8r2CqUBCb8r Read more: http://www.blogdoctor.me/2007/02/expandable-post-summaries.html#ixzz2CqSEJcpq

Sunday, June 17, 2012

HTML5 intellisense in vs 2010

Hello Folks,

To get HTML5 tags in visual studio 2010, we first need to have service pack1 of visual studio 2010 installed in our PC.
Get service pack from the following link:
http://www.microsoft.com/en-us/download/details.aspx?id=23691

After installing vs2010 sp1, open visual studio go to tools,Options
Go to Text Editor, expand it and then goto HTML and expand it.
goto validation and select HTML5 in the 'Target' dropdown box that appears in the next pane as shown in the following pic



Now HTML5 tags will be shown in the intellisense of vs 2010.

Cheers,
UV
Read more! Read more: http://www.blogdoctor.me/2007/02/expandable-post-summaries.html#ixzz2CqUkfMpH Read more: http://www.blogdoctor.me/2007/02/expandable-post-summaries.html#ixzz2CqUBCb8r2CqUBCb8r Read more: http://www.blogdoctor.me/2007/02/expandable-post-summaries.html#ixzz2CqSEJcpq

Thursday, March 8, 2012

Page Request Manager Server Error Exception 500

Hi folks, Here is a irritating bug which i got in my code for what i had done some walk through and found out solution. this may be helpful to someone who is struggling like me.
If you get a similar error just go to your page directive and add the following piece of code ValidateRequest="false"

your error will be fixed.


 Happy coding,
Cheers,
UV 
 
Read more! Read more: http://www.blogdoctor.me/2007/02/expandable-post-summaries.html#ixzz2CqUkfMpH Read more: http://www.blogdoctor.me/2007/02/expandable-post-summaries.html#ixzz2CqUBCb8r2CqUBCb8r Read more: http://www.blogdoctor.me/2007/02/expandable-post-summaries.html#ixzz2CqSEJcpq

Tuesday, September 27, 2011

Creating Dynamic controls in Asp.Net

Hi frnds... let us start creating dynamic controls in asp.net with a simple example of creating text boxs at runtime, After this we 'll dig into in our next example.
Firstly add a placeholder to your .aspx page like this
 <asp:PlaceHolder ID="phTextBoxes" runat="server"></asp:PlaceHolder>
now we are going to create 5 text boxes,
go to .cs file and in the method which you are trying to call for the creation of dynamic controls or in  page load write the following

 if(!IsPostBack)
{
 for (int i = 0; i <= 5; i++)
        {
                TextBox tobj = new TextBox();
                tobj.ID = "Tb" + i.ToString();
                tobj.CssClass = "tb_hello";
          }
}

Here  TextBox tobj = new TextBox(); will create a text box object for which you can give all the properties
that will be given to a general text box control created statically.
After creating a textbox control we need to add this to the placeholder That has been added to our .aspx file like this

phTextBoxes.Controls.Add(tobj);

after adding this line our code it looks as follows


if(!IsPostBack)
{


 for (int i = 0; i <= 5; i++)
        {
                TextBox tobj = new TextBox();
                tobj.ID = "Tb" + i.ToString();
                tobj.CssClass = "tb_hello";
                tobj.Visible = true;
                phTextBoxes.Controls.Add(tobj);
            }
}

All this is when the page doesn't gets PostBack, but what if the page IsPostBack...

here comes the problem, when the page gets post back the controls gets disappeared from the form.
we can solve this problem by checking weather the controls are present in the placeholder. so for that we will add the following line.

// this is for IsPostBack
if (phTextBoxes.FindControl("Tb" + i)== null)
{
-----------;
----------;
}

after adding this our code looks  like this,


 for (int i = 0; i <= 5; i++)
        {
              TextBox tobj = new TextBox();
            if (phTextBoxes.FindControl("Tb" + i)== null)
            {
                tobj.ID = "Tb" + i.ToString();
                tobj.CssClass = "tb_hello";
                tobj.Visible = true;
                phTextBoxes.Controls.Add(tobj);
            }
        }

That's all 5 textboxes will be created with style as declared in css "tb_hello" that is created in .aspx file.


Hope it 'll help someone who are starting with dynamic controls...
Read more! Read more: http://www.blogdoctor.me/2007/02/expandable-post-summaries.html#ixzz2CqUkfMpH Read more: http://www.blogdoctor.me/2007/02/expandable-post-summaries.html#ixzz2CqUBCb8r2CqUBCb8r Read more: http://www.blogdoctor.me/2007/02/expandable-post-summaries.html#ixzz2CqSEJcpq

Thursday, December 30, 2010

Hi friends... Im back with some data regarding "CLOUD COMPUTING", here I am going to discuss about what cloud computing is...

       I as per my research I came to know that, cloud computing is a technology that makes use of internet and central servers to maintain both data and applications. In most of the sites I have gone through they mentioned that cloud computing will reduce the cost of production drastically. But no one explained how it actually happens.... here in my blog Im going to consentrate on that.

The following thing is just an example which you can corelate to your domain, as Im a developer I will be covering from my point of view...

K let us start..

Friends, for every company each and every project development require some sort of applications, IDE's, databases.. etc, for which they have to go for licencing. and this costs a lot to the organaizaton. And more over each and every system that got involved in the project should get all those applications with license but a person(say developer) may not be using all those allpications that got installed on his pc simultaniously...

   Consider a company is having a project and it want both Microsoft office and Oracle for that project... and all the developers that are involved in the projects got installed with these licenses on their pc's..  A( let a developer) is also having both applications installed on his pc.. but he is working on oracle for most of the time then if we make use of his licensed Ms Office by give it to someother one who is in use of that application then we can reduce the cost for one more licincing burden on the Organization.

Cloud computing comes into picture when we think of the above situation. where all the applications will be installed in the cloud(server pc which can be connected using internet) and all the pc's will connect to that server using internet and make use of all the applications. For this the only thing that a organization should do is to pay money for the service provider(the organaization that is having a Cloud Burst, presently Google, Amazone,Microsoft,IBM etc are having their own Cloud whome we can consider as serviece providers) for only the applications that they make use... on rental basis by which the cost of production reduces drastically...

Frnds this is what i understood by reading from many sites......... so if someone who is having a better knowledge on this concept can comment on this post..... so kindly comment on this and give me a better idea... Thank you... Read more! Read more: http://www.blogdoctor.me/2007/02/expandable-post-summaries.html#ixzz2CqUkfMpH Read more: http://www.blogdoctor.me/2007/02/expandable-post-summaries.html#ixzz2CqUBCb8r2CqUBCb8r Read more: http://www.blogdoctor.me/2007/02/expandable-post-summaries.html#ixzz2CqSEJcpq