geekgemini

Stories kicked by geekgemini

Ajax autocomplete textbox in EditItemTemaplate of GridView(csharpdotnetfreak.blogspot.com)

submitted by amit.jainamit.jain(1181) 3 years, 4 months ago

In this example i am implementing the AutoComplete functionality to textbox in the EditItemTemaplate of GridView using AJAX autocomplete extender, for this we need to create a web service which calls the method to fetch data from database and display results as suggestions for textbox For this add a new webservice to the project and name it AutoComplete.asmx or whatever you want, in the code behind of the web service we write methods to get the records from database and a web method called GetCompletionList which takes text entered in textbox as parameter to search database , this method gets automatically called when ever user types anything in the textbox, the code for this web service is like this read more...

add a comment |category: |Views: 103

tags: another

Export GridView to Pdf using iTextSharp in ASP.NET(csharpdotnetfreak.blogspot.com)

submitted by amit.jainamit.jain(1181) 3 years, 5 months ago

In this example i m exporting Gridview populated with SqlDataSource to Pdf using iTextSharp in click event of Button This is the html source of the page in which i've created a gridview,Sqldatasource and a Button to export GridView to Pdf read more...

add a comment |category: |Views: 705

tags: another

Detect Browser refresh to avoid events getting fired again in ASP .NET(csharpdotnetfreak.blogspot.com)

submitted by amit.jainamit.jain(1181) 3 years, 5 months ago

If you have created a aspx page using C# and ASP.NET and have put a button on it , and in the Click event of this button if you are inserting some data in database , after click if user refresh the page than click event gets fired again resulting data insertion to database again, to stop events on the page getting fired on browser refresh we need to write bit of code to avoid it In this example i've put a Label and a Button on the page, on click the label Text becomes Hello and when i refresh the page label's text again becomes Hello read more...

add a comment |category: |Views: 428

tags: another

Merging GridView Headers to have multiple Headers in GridView using C#(csharpdotnetfreak.blogspot.com)

submitted by amit.jainamit.jain(1181) 3 years, 6 months ago

Here is the example to Have multiple headers in a gridView or merging headers in GridView using C# and ASP.NET For this you need to create GridView header row in RowCreated Event In Code behind, in RowCreated Event of grid view i m creating a new gridview row of header type and than in this row i m adding 2 cells read more...

add a comment |category: |Views: 744

tags: another

Detecting Session Timeout and Redirect to Login Page in ASP.NET(csharpdotnetfreak.blogspot.com)

submitted by amit.jainamit.jain(1181) 3 years, 6 months ago

In this example i'll show how to detect the session timeout which occurs when user is idle for the time specified as Session.Timeout,using C# asp.NET and if it is than redirect the user to login page to login again, for this i've set time out value in web.config file to 1 minute I've created three pages in this example , one is login page , when session expires , i redirect to this page , one is navigation page where i'll check if session is valid or not , if it is valid than only user will see this page other wise he gets redirected to login page read more...

add a comment |category: |Views: 821

tags: another

Pouplating Multiple DetailsView based on single GridView using DataKey(csharpdotnetfreak.blogspot.com)

submitted by amit.jainamit.jain(1181) 3 years, 6 months ago

This is a example of populating three different DetailsView based on selection of of record in a GridView using DataKeyNames in C sharp and ASP .NET read more...

add a comment |category: |Views: 139

tags: another

Cross page posting ,submit form and Server.Transfer methods in asp.net(csharpdotnetfreak.blogspot.com)

submitted by amit.jainamit.jain(1181) 3 years, 6 months ago

4. Cross page posting in ASP.NET To transer data using cross page posting we need to use FindControl Method we can write code like this 6. Server.Transfer Method in ASP.NET Server.Transfer method sends (transfers) all the state information all application/session variables and all items in the request collections) created in one ASPX page to a second ASPX page. you can't use Server.Transfer to send the user to an external site The Server.Transfer method also has a second parameter—"preserveForm". If you set this to True, using a statement such as Server.Transfer("WebForm2.aspx", True), the existing query string and any form variables will still be available to the page you are transferring to. For example, if your Default.aspx has a TextBox control called TextBox1 and you transferred to Default2.aspx with the preserveForm parameter set to True, you'd be able to retrieve the value of the original page TextBox control by referencing Request.Form("TextBox1"). read more...

add a comment |category: |Views: 28

tags: another