Sunday, September 5, 2010

TypeDataset

How to create typed Dataset
1>First create a table with sql server enterprise manager
Say we have created a table with name member which have a following filed
:=>PKID(Int),MemberID(bigint),Name(Varchar),Salary(float),SalaryType(bit).

2>Enter few records into the table.
3>Now open the visual studio .net editor.
4>Craete a new asp.net web site.
5>In Solution Explorer, right-click to add a new item, and select DataSet. Give it the name MemberDataSet.xsd. Visual Studio will recommend placing the DataSet file inside the App_Code folder, which you should allow it to do for you.
6>Now cancel the connection interface which will open as default.
7>Open the server explorer.drag table into the design window.
8>Now right ckick on the TableAdaptor=>click on configure.
9>Customize the query accordingly=>Click Next=>Specify the Method name=>Click next=>Click Next.
10>Now come to the code behind and add the following code.

The way out in which not need to create any connection.

the way out in which need to create connection.

//Person Table first row name collumn
//objDS.Person[0].Name = 1;
//It will generate compile time error.

Monday, July 12, 2010

How HttpHandlers work with Example

Watermarking PDF documents using HttpHandlers
Whenever we work with Httphandler we have to inherit IHttpHandler.
We will be unable to inherit IHttpHandler unless & until we add System.web as references.
1>Create a class library with the name Handler

2>Rename the class1.cs with required Class and here it is PdfHandler.

3>Add IHttpHandler interface.If any problem occured just ad the reference System.web from .Net tab listing.

4>Add ProcessRequest and IsReusable Method.

5>Download the iTextSharp.dll and add it to references so as to pdf related function can work.
6>Build the class library.After successfully build dll will be generated.
7>Create a new website TestPdfRender and add the binary output of the custom handler as a reference.

8>Add the handler to the web.config.

9>To map the .pdf extension through IIS: within IIS, right click on TestPdfRender->properties->under Directory tab, click on configuration->add a new extension with extension .pdf and set Executable to the .NET runtime ("c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll")

keep the rest of the sections to their default values.
Click on OK to close all the open configuration windows.
Note:here IIS 6 have one error after selecting the dll at once ok button is not being enable.Just click on the executable text box then ok button is enable.

10>Now the application is ready for testing.open the default.aspx and add this test hyperlink control:

11>Genereated output is.

Saturday, July 3, 2010

How to Create Custom Tag Library

How to Create Custom Tag Library

1>Create a java file by select application=>New=>class
Here 2 java file has been created one is memberInfo and another is FeedbackInfo.MemberInfo contain member information and FeedbackInfo contain member feedback information.For a specific member there may be number of feedback.

MemberInfo.java

FeedbackInfo.java

2>Create tld file and keep it into WEB-INF/tld directory
Two tld file has been created for tow java files.One is MemberInfo.tld and another is MemberFeedbackInfo.tld.

MemberInfo.tld

MemberFeedbackInfo.tld

3>Create a jsp page and assign require tld on the top of the page.

4>Project folder structure

Saturday, June 26, 2010

How to create custome control

How to create custome control
custom control are compile code that execute on server.Custom control can be simply build by override the Render() method.To create a custom control we just need to do the following steps

1>open visual studio.

2>create a Web COntrol Library Project

3>Overrid the Render Method.

4>Build the project and generate the Dll.
5>Create a Web project.

6>Add dll.

7>Add custom control.

8>Build and run the code.

How To solve Configuration Error


If the above error occur the simplest solution is doing the following changes..

The actual reason is that the latest version of Ajax Control Toolkit expect to have a .net 3.5SP1 runtime environment.So we need to install Dotnet Framework 3.5SP1 and the issue will be solved.We can find the require service pack here
How To solve Configuration Error
If the configuration error occur that could not load assemby system.web.extension that meas we want to browse a site which has been made with Ajax control toolkit but the toolkit version is not being installed.In the above senario we need to install the ajax control toolkit the the problem will solve.

Sunday, June 6, 2010

How to java standard tag library work

To Use JSTL we need to do the following things


1>Download the standard.jar and jstl.jar and keep them into web-INF/lib folder.
Download Link
2>Download the requeried tld.
3> For your JSTL Web application, edit your web.xml file and add the following entries:



How to work MySql Cursor,Store Procedure,Function

MySql Cursor calling from java


Mysql Cursor Example

Mysql Cursor Example

Mysql Function Example

Saturday, May 22, 2010

How to open popup with Post field

Do the following Things
1>First keep the code in the parent page
2>Keep the following javascript In the above code multi popup is open so dynamicaly change the target name.
Note:When we want to open multi popup at that moment we just dynamically change the sub window name.

How to open popup with Post field

Do the following Things

1>First keep the code in the parent page

2>Keep the following javascript
In the above code multi popup is open so dynamically change the target name.
Note:When we want to open multi popup at that moment we just dynamically change the sub window name.