Uploading images into picture library in sharepoint using c#

June 22, 2009

please refer the following link

http://sharepointt.blogspot.com/2009/06/uploading-images-into-picture-library.html


What is new in asp.net2.0

December 27, 2007

Read the following link to know about asp.net 2.0

what is new in asp.net 2.0


my articles in different forums Realated to dotnet

December 24, 2007

comparing the two dates in c#

common elements from the two arrays

Exporting Datagrid to excel or worddoc using asp.net

Sending email using asp.net1.1

Sql Joins with Examples

Difference between Char, Varchar and Nvarchar.

Connection Pooling in dotnet.

sessions,querystring,application and viewstate.


close button in asp.net

November 5, 2007

to close a asp.net webpage dynamically..write the following code for the button click event..

private void btnClose_Click(object sender, System.EventArgs e){

Response.Write(“<script language=’javascript’> { self.close() }</script>”);

}


dynamically generate some controls in the table’s td tags

October 9, 2007

Hi,Recently i had the follwing problem and i provided the solution for that one using the below code..My requirement is i have a table. and in that i have two rows(trs)
in first row i have  two tds .In first td i have a textbox and in second td i have a button named “save”
In second row (tr) i have only one td ……..this td consists of a button named “add new row”
if i click on the “add new row ” button another row has to be  generated dynamically with textbox and button like first row.

 Solution
 

<!–File:Dynamically_Generate_Row.aspx–><%@ Page Language=”C#” AutoEventWireup=”true”
CodeFile=”Dynamically_Generate_Row.aspx.cs”
Inherits=”Dynamically_Generate_Row” %>
<!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>Untitled Page</title>
</head>
<body>
    <form id=”form1″ runat=”server”>
    <div>
    <table>
    <% for (int i=0; i<_nRowCount; i++) {%>
     <tr>
     <td>
     <input type=”text” value=”” id=”text<%=i %>>”/>
     </td>
     <td>
     <input type=”button” value=”Save” id=”btn<%=i %>>” />
     </td>
     <% } %>
     </tr>
     <tr>
     <td>
     <asp:Button ID=”btn_CreateRow” runat=”server” OnClick=”OnCreateRow”  Text=”AddNew”/>
     </td>
     </tr>
    </table>
   
    </div>
    </form>
</body>
</html>
 
//File:Dynamically_Generate_Row.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Dynamically_Generate_Row : System.Web.UI.Page
{
    public int _nRowCount=1;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (null == Session[“row_count”])
            Session[“row_count”] = “1”;
      
        _nRowCount = System.Convert.ToInt32(Session[“row_count”]);
    }
    protected void OnCreateRow(object sender, EventArgs e)
    {
        if (null == Session[“row_count”])
            Session[“row_count”] = “1”;
        else
        {
            int i = (System.Convert.ToInt32(Session[“row_count”]) + 1);
            Session[“row_count”] = i.ToString();
        }
        _nRowCount = System.Convert.ToInt32(Session[“row_count”]);
    }
}
  


Connection pooling

September 27, 2007

Connection pooling enables an application to use a connection from a pool of connections that do not need to be re-established for each use. Once a connection has been created and placed in a connection pool, an application can reuse that connection without performing the complete connection creation process. By default, the connection pool is created when the first connection with a unique connection string connects to the database. The pool is populated with connections up to the minimum pool size. Additional connections can be added until the pool reaches the maximum pool size.When a user request a connection, it is returned from the pool rather than establishing new connection and, when a user releases a connection, it is returned to the pool rather than being released. But be sure than your connections use the same connection string each time. Here is the Syntax conn.ConnectionString = “integrated Security=SSPI; SERVER=127.0.0.1; DATABASE=test; Min Pool Size=4;Max Pool Size=40;Connect Timeout=20;”;

for my more articles read

http://www.beklo.com/rameshgoudd


Page Smart Navigation In Asp.net

September 10, 2007

AuctionAds: Increase the bid on your site’s income!
It enables you to retain the browser current position during postback.and it is used to maintaining the screen position fixedly . We can give the smartnavigation property at two levels.They are
1)Page level..
In the page directives ..write the code like this

Or
Set the form properties i .e  smartNavigation=True2)Application level

This is for total project instead of writing the code in each page write like the following code in web.config
pages smartNavigation=”true”/