Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

Suamal

@Suamal
About
Posts
31
Topics
8
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • FireEvent in firefox
    S Suamal

    In ie we can fire the event from popup window to opener as opener.document.all('b1').fireEvent("onclick"); b1 - is button in parent. how to implement this in firefox?

    ASP.NET tutorial question

  • Session lose value
    S Suamal

    You can add global.asax by choosing new item and global application class in .net 2005

    ASP.NET help

  • Problem in dropdown
    S Suamal

    Thank You. I will use like that.

    ASP.NET javascript help tutorial

  • Pop up [modified]
    S Suamal

    window.status='hi username'; You can use this code to display in status bar of the window using javascript

    ASP.NET csharp javascript asp-net help tutorial

  • problem in datagrid
    S Suamal

    dtGrid1.ShowHeader =false;

    ASP.NET help tutorial

  • Session lose value
    S Suamal

    In global.asax on Session_onStart initialize as Session("ID")=null and find whether there is any other assignment in the other pages for Session("ID"). set break point on session_onstart event to find when session got initialized

    ASP.NET help

  • Problem in dropdown
    S Suamal

    see my code 1. 2.I have used this javascript to populate the dropdown ( For sample i have used the count,it is getting at runtime) function add() { var ddlobj = document.getElementById('ddemp'); for (var count = ddlobj.options.length-1;count >-1; count--) { ddlobj.options[count] = null; } for (var count = 0; count < 5;count++) // For sample i have used the count,it is getting at runtime { value = count; text = "List" + count ; listItem = new Option(text, value , false, false); ddlobj.options[ddlobj.length] = listItem; } } 3.while clicking one more button, i am not getting the selected value. it shows ddemp.Items.Count as 0

    ASP.NET javascript help tutorial

  • How can I disable "Back" in my page
    S Suamal

    You can't disable back button.But you can restrict the back button functionality // go forward window.history.forward(); while pressing back it will automatically forwards once.So the same page retains. while the history.forward() method lets you access the next URL in the history list (equivalent to hitting the browser's "Forward" button).

    ASP.NET question

  • Problem in dropdown
    S Suamal

    In my page i am having a dropdownlist control. I have populated the data for this dropdown using javascript. i.e it has 5 items. But upon postback ,it says that the data in the dropdown is 0.How to solve this.

    ASP.NET javascript help tutorial

  • Paging in datagrid
    S Suamal

    Loop count of datagrid displays only the current page item count. But in view state we can store all. I will explain you how? #Fill grid method() 1.Populate the grid (say 100 rows with 1 to 100 as ids) clear viewstate 2.in first page select 2 checkboxes 3.In paging (to 2nd page) add 2 ids to viewstate. now it has 1,2. while retriving check for 1,2 ids in grid it will not be there. 4.In second page u select 3 add 3 ids with existing viewstate now it has 1,2,11,12,13 while retriving check for 1,2,11,12,13 ids in grid it will not be there. 5.goto 3rd page ,without selecting any ids. now viewstate has 1,2,11,12,13 6.Return to 2nd page now while retriving check for 1,2,11,12,13 ids in grid 11,12,13 ids will be there. If you change anything, you have to alter the viewstate. # in maintain view Private Function Maintain_View1() Dim Arr As New ArrayList() Dim gridItem As DataGridItem If Not (ViewState("ID") Is System.DBNull.Value) Then Arr = CType(ViewState("ID"), ArrayList) End If For Each gridItem In DataGrid1.Items Dim chk As CheckBox = DirectCast(gridItem.FindControl("Status"), CheckBox) Dim lbl As Label = DirectCast(gridItem.FindControl("ID"), Label) //If already exists then, remove it from the list If Arr.Contains(lbl.Text) Then Arr.Remove(); End If If chk.Checked Then Arr.Add(lbl.Text) End If Next ViewState("ID") = Arr End Function #call retrive view after fill GRid method Sub Pageing_Routine(ByVal s As Object, ByVal e As DataGridPageChangedEventArgs) DataGrid1.CurrentPageIndex = e.NewPageIndex Maintain_View1() Fillgrid() Retrieve_Viewstate1() End Sub

    ASP.NET

  • Paging in datagrid
    S Suamal

    Like this you can implement it on vb.net . I jave given a rough code to do private void Page_Load(object sender, System.EventArgs e) { // Put user code to initialize the page here if(!IsPostBack) { Fillgrid(); //Initialize view state ViewState["ID"]=null; } } private void Fillgrid() { //To fill the grid } private void Maintain_View() { ArrayList ar=new ArrayList(); //Get Array List from Viewstate if(ViewState["ID"]!=null) ar=(ArrayList)ViewState["ID"]; //Check for items in the datagrid and accoring to the checkbox value //add it to arraylist foreach (DataGridItem dt in dgItems.Items) { //If check box valuw is checked { ar.Add(checkId); //Add to arrayList } } //Set it to viewstate ViewState["ID"]=ar; } private void Retrieve_View() { ArrayList ar=new ArrayList(); //Get Array List from Viewstate if(ViewState["ID"]!=null) ar=(ArrayList)ViewState["ID"]; //Compare this with datagrid items and populate the checkboxes } private void dgItems_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e) { //while in pagination dgItems.CurrentPageIndex =e.NewPageIndex(); Maintain_View(); Retrieve_View(); Fillgrid(); }

    ASP.NET

  • Email validation
    S Suamal

    Try this. I think it will help you. using System.Text.RegularExpressions; public static bool CheckEmailAddress(string strText) { //Validates the Email address string strPattern = @"^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@(([0-9a-zA-Z])+([-\w]*[0-9a-zA-Z])*\.)+[a-zA-Z]{2,9})$"; return CheckRegExPattern(strPattern, strText.Trim()); } public static bool CheckRegExPattern(string strPattern, string strText) { return Regex.IsMatch(strText.Trim(), strPattern); }

    ASP.NET csharp tutorial

  • Paging in datagrid
    S Suamal

    I think I am late to answer you.Have you solved this? Otherwise Don't maintain viewstate for each page. in not postback, initialize the viewstate (i.e clear it) 1.you have checked something in first page (2 check boxes) 2.Now you are moving to other, at that time save the checkbox's ids in viewstate. (viewstate has 2 values). 3.you have checked something in second page (3 check boxes) 4.You are moving to the third page, get the array from already existing view state and append second page's checkbox ids. (Now viewstate has 2+3 values) 5.while submitting , get it from viewstate and clear it. 6.Incase if you come to previous page,check with viewstate and populate the check boxed accordingly, if there is any change, change the viewstate value. Hope it will help you.

    ASP.NET

  • customerror
    S Suamal

    In web.config you can set like this -- modified at 7:04 Thursday 15th June, 2006

    ASP.NET csharp asp-net help question discussion

  • Paging in datagrid
    S Suamal

    You can save the checkbox ids in a viewstate and get it later while submitting.Otherwise use datagrid without paging.

    ASP.NET

  • Count WebSite Visitors
    S Suamal

    Please go through this article.I hope it will help you. http://codebetter.com/blogs/brendan.tompkins/archive/2005/01/25/48325.aspx

    ASP.NET help tutorial question

  • Multiline Datagrid Control [modified]
    S Suamal

    You can use template column in the grid with two labels to display 2 fields use
    to display it in other line

    ASP.NET help career

  • Reporting Service install problem...
    S Suamal

    I think you can check the reporting service requirement .It needs sql server 2000 with server pack3

    C# help database sql-server sysadmin business

  • Count WebSite Visitors
    S Suamal

    The problem is because session_onEnd event will not be fired while you logged out of the application or closes the window. (on session end)

    ASP.NET help tutorial question

  • selection of a combo box shows other buttons
    S Suamal

    You can double click the drop down in the design , it will open the cede page with selected index changed event. There you can write code to make other dropdown visible. Set autopostback property of dropdown to true

    C#
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups