How to use Asp.net
  • Home
  • About us
  • Disclaimer
  • joy of helping
KEEP IN TOUCH

Monthly archives for March, 2011

how to create linkbutton dynamically asp.net VB

Mar31
2011
1 Comment Written by vikram

Hello there, in this article i will create LinkButton Control Dynamically using VB  and you can refer my Article in which i have used C# language.

http://howtouseasp.net/how-to-create-linkbutton-dynamically-asp-net-c/

Create a page and name it lnkBtnVb and copy paste below the Source Code in it.

<%@ Page Language=”VB” AutoEventWireup=”false” CodeFile=”lnkBtnVb.aspx.vb” Inherits=”lnkBtnVb” %>

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>

<html xmlns=”http://www.w3.org/1999/xhtml”>
<head runat=”server”>
<title></title>
</head>
<body>
<form id=”form1″ runat=”server”>
<div>
<asp:Label ID=”Label1″ runat=”server” Text=”Label”></asp:Label>
<br /><br /><br /><br />
<asp:PlaceHolder ID=”PlaceHolder1″ runat=”server”></asp:PlaceHolder>
</div>
</form>
</body>
</html>

 

READ MORE »

Posted in Asp.net

How to create LinkButton dynamically Asp.net C#

Mar31
2011
5 Comments Written by vikram

Hello there, in this article i will create LinkButton Control Dynamically using C# and will fire Command event and can use according to your need. This will be very useful in Paging where we want to display the paging in numeric.

Now, Add a Webform name it LnkBtn.aspx and place the Label, LinkButton Control and PlaceHolder in which we add dynamically generated LinkButton Controls

Or copy paste the Below Source Code

<%@ Page Language=”C#” AutoEventWireup=”true” CodeFile=”LnkBtn.aspx.cs” Inherits=”LnkBtn” %>

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>

<html xmlns=”http://www.w3.org/1999/xhtml”>
<head runat=”server”>
<title></title>
</head>
<body>
<form id=”form1″ runat=”server”>
<div>
<asp:Label ID=”Label1″ runat=”server” Text=”Label”></asp:Label>
<br /><br />
<asp:PlaceHolder ID=”PlaceHolder1″ runat=”server”></asp:PlaceHolder>
</div>
</form>
</body>
</html>

READ MORE »

Posted in Asp.net

How to pass the Single and Multiple values to paypal asp.net c#

Mar27
2011
6 Comments Written by vikram

For better testing create SANDBOX testing account in paypal. [www.paypal.com]

Here I m going explaining about Paypal a little bit that how we can send the multiple and single values to paypal. In paypal we can send the price in Dollar, Euro or which is accepted by paypal. Well, I m here explain the little format that how can we send the values to paypal from our website. We need just pass the parameters. You can refer the following link. In this link the paypal describe about the command and format of the values, which we have to pass to the paypal.

[https://www.paypal.com/cgi-bin/webscr?cmd=_pdn_howto_checkout_outside]

A string example:-

https:// www.paypal.com/us/cgi-bin/webscr? cmd=_ xclick&business=[yoouremailid]&item_name=[your item name value]&amount=[your amount]&quantity=[your quantity]&return=[your return address]?Paypal=true&cancel_return=[your cancel return address]?Paypal=false READ MORE »

Posted in Asp.net

Find CheckBox control in GridView ado.net way C#

Mar27
2011
2 Comments Written by vikram

In this article I will explain you how to find the control in Gridview.I m using checkbox control in it and will check on button click which one is selected and will display in another Gridview using Temporary Table.

Here copy the following data script and insert the records in it.
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON READ MORE »

Posted in Asp.net

FormView in Asp.net Ado.net way C#

Mar27
2011
1 Comment Written by vikram

Hello there, In this article i am explaining how to use formview control. Unlike the DetailsView, the FormView is not composed of fields. You can’t add a BoundField or TemplateField to a FormView Conttrol. The formView control is completely template driven You can also add validation controls  Instead, the FormView is rendered using templates. Think of the FormView as a DetailsView control that contains a single TemplateField. The FormView supports the following templates:

  • ItemTemplate render the particular record displayed in the FormView Control.
  • HeaderTemplate specify an optional header row.
  • FooterTemplate specify an optional footer row.
  • EmptyDataTemplate when the FormView’s DataSource lacks any records, EmptyDataTemplate is used in place of the ItemTemplate for rendering the control’s.
  • PagerTemplate used to customize the paging interface for FormViews that have paging enabled.
  • EditItemTemplate / InsertItemTemplate used to customize editing interface or inserting interface for FormViews that support such functionality.

FormView control to:

  • Display
  • Insert
  • Edit
  • Delete
  • Page

Formview control has a property name Defaultmode in which there are three options ReadOnly, Edit and Insert. These mode will fire for Editing the Deleting the records as this control behaviour little different than other controls. Here we start copy and paste the following database script and run it into your sql server.

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N‘[dbo].[tbformview]‘) AND type in (N‘U’))

BEGIN

CREATE TABLE [dbo].[tbformview](

[id] [int] IDENTITY(1,1) NOT NULL,

[Name] [varchar](50) NULL,

[Class] [varchar](50) NULL,

[Address] [varchar](50) NULL

) ON [PRIMARY]

END

 

READ MORE »

Posted in Asp.net

DetailsView control in ASP.Net Ado.net way C#

Mar27
2011
1 Comment Written by vikram

Hello there, In this article i m using Detailsview control with simple way as we know that  the DetailsView control in ASP.Net 2.0 is used to create an HTML table that displays the contents of a single database record.

Now, create a database following the script you can copy and paste it in your sql server 2005 database

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N‘[dbo].[tbformview]‘) AND type in (N‘U’))

BEGIN

CREATE TABLE [dbo].[tbformview](

[id] [int] IDENTITY(1,1) NOT NULL,

[Name] [varchar](50) NULL,

[Class] [varchar](50) NULL,

[Address] [varchar](50) NULL

) ON [PRIMARY]

END

READ MORE »

Posted in Asp.net

Paging with Repeater Control in asp.net Ado.net way C#

Mar27
2011
5 Comments Written by vikram

In this article i am explaining how to do insert the records & paging in repeater as we know that repeater doesn’t support deleting, paging properties and updating command. First of all create a database following the script which you can copy and paste it in your sql server 2005 and paste it.

*You can refer my Datalist articel in which i have used same method for paging.

http://howtouseasp.net/?p=70

 

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N‘[dbo].[tbrepeaterView]‘) AND type in (N‘U’))

BEGIN

CREATE TABLE [dbo].[tbrepeaterView](

[id] [int] IDENTITY(1,1) NOT NULL,

[Name] [varchar](50) NULL,

[Class] [varchar](50) NULL,

[Address] [varchar](50) NULL

) ON [PRIMARY]

END

READ MORE »

Posted in Asp.net

Datalist paging with Editing, Deleting and updating with Ado.net way C#

Mar27
2011
3 Comments Written by vikram

In this article i am explaining how to do paging, Editing & deleting in datalist as we know datalist control does not support paging properties as Gridview control support. In this article i m displaying two images with paging.  First of all create a database following the script which you can copy and paste it in your sql server 2005 and place four linkbuttons and named it. btn_prev,btn_first, btn_nxt ,btn_last,lb_edit,lb_update,lb_cancel & lb_delete.

·You can add validations according to your need.

You can refer below Link for paging only.

http://howtouseasp.net/?p=67

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N‘[dbo].[tbhostel]‘) AND type in (N‘U’))

BEGIN

CREATE TABLE [dbo].[tbhostel](

[id] [int] IDENTITY(1,1) NOT NULL,

[Name] [varchar](50) NULL,

[Roomno] [int] NULL,

[age] [int] NULL,

[Address] [varchar](50) NULL,

[Image] [varchar](50) NULL

) ON [PRIMARY]

END

 

READ MORE »

Posted in Asp.net

How to do paging in Datalist with images Ado.net way C#

Mar27
2011
1 Comment Written by vikram

In this article i am explaining how to do paging in datalist as we know datalist control does not support paging properties as Gridview control support. In this article i m displaying two images for paging and according to your requirement you can change it.  First of all create a database following the script which you can copy and paste it in your sql server 2005 and place four linkbuttons and named it.btn_prev,btn_first, btn_nxt and btn_last.

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N‘[dbo].[tbStudent]‘) AND type in (N‘U’))

BEGIN

CREATE TABLE [dbo].[tbStudent](

[id] [int] IDENTITY(10,1) NOT NULL,

[name] [varchar](50) NULL,

[age] [int] NULL,

[rollno] [int] NULL,

[address] [varchar](50) NULL,

[image] [varchar](50) NULL

) ON [PRIMARY]

END

READ MORE »

Posted in Asp.net

How to use GridView with Databound fields Ado.net way C#

Mar27
2011
Leave a Comment Written by vikram

Hello there, here i m explaining how to use Databound fields using gridview before this article i have written an article on ItemTemplate fields using gridview.

*you can refer below link to get to know about how to create  Events for gridview.

http://howtouseasp.net/?p=61

 

now first of all we will create a database.  Here the following script, copy it and run it.

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N‘[dbo].[tbEmp]‘) AND type in (N‘U’))

BEGIN

CREATE TABLE [dbo].[tbEmp](

[id] [int] IDENTITY(1,1) NOT NULL,

[name] [varchar](50) NULL,

[age] [int] NULL,

[address] [varchar](50) NULL

) ON [PRIMARY]

END

READ MORE »

Posted in Asp.net
« Older Entries

Joy of Helping

Any sort of help to the children who are fatherless, poor & are from far-off areas.
Joy of Helping

Facebook Link

Asp dot Net ,Ajax,Xml.

Recent Posts

  • ROW_NUMBER(), NTILE(), partition by, Duplicate Records, CTE sql server 2008
  • How to get second highest Salary sql server 2008
  • Insert values, insert into, insert default value, insert execute and select into sql server 2008
  • How to Bind GridView with SqlDataReader in Asp.net
  • how to attach files to email without storing on disk using Asp.net FileUpload control

Recent Comments

  • Anonymous on ROW_NUMBER(), NTILE(), partition by, Duplicate Records, CTE sql server 2008
  • dhananjay on How to use GridView with Insert, Edit, Update, Delete the Ado.net way C#
  • dev on How can we limit the characters in multiline textbox asp.net using JavaScript
  • navneet on How to display image in Image control after upload on the server asp.net C#
  • AnhVu on How to do Shopping Cart in Asp.net C#

Archives

  • February 2013
  • September 2012
  • April 2012
  • January 2012
  • October 2011
  • August 2011
  • May 2011
  • April 2011
  • March 2011

Categories

  • Asp.net
  • jQuery
  • Sql Server

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

EvoLve theme by Theme4Press  •  Powered by WordPress How to use Asp.net