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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
S

SharonRao

@SharonRao
About
Posts
11
Topics
8
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • using replace function, Please help
    S SharonRao

    Hello all, I have a products table (see below) Product State Apple |1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|2 0|21|22|23|24|25|26|27| I have to display the state data on a webform replacing the numbers with actual state names for example replace 1 with auckland, 2 with northland and so on. How to do this in SQL. the returned data from my sql query should look like this string, how do i write the query to acheive this. Auckland
    Northland
    Waikatoo
    Please help. Cheers, Shilpa.

    Thanks in Advance for your help. Best Regards

    Database database tutorial help question

  • how to access the checkbox control in nested gridview
    S SharonRao

    hello all, I have master detail gridview master gridview company and detail gridview is peoplelist, i wanted to implement multiple selection in detail gridview using checkboxes. But i am not sure how to get the datakey (in mycase personid) of all the rows in which the checkbox is selected. I need to do insert operation using these personid's can anyone point me in the right direction. Cheers, Shilpa. I am trying to access the child gridview in this method but not able to do so GridView People = grdCompanyPeople.FindControl("grdPersons")as GridView for (int i = 0; i < People.Rows.Count; i++) { GridViewRow Singlerow = People.Rows[i]; bool isChecked = ((CheckBox)Singlerow.FindControl("chkSelect")).Checked; if (isChecked == true) { str.Append(People.DataKeys[Singlerow.RowIndex]["PersonID"].ToString() + ","); } } // prints out the result Response.Write(str.ToString());

    Thanks in Advance for your help. Best Regards

    ASP.NET help tutorial

  • Dyanmically creating templatefield Gridview c#
    S SharonRao

    sorry this was supposed to be table of 5 columns and 3 rows but its not shown properly ProductImage productImage productImage productImage productImage ProductName ProductName ProductName ProductName ProductName Price price price price price

    Thanks in Advance for your help. Best Regards

    C#

  • Dyanmically creating templatefield Gridview c#
    S SharonRao

    Hello All, I need to create a template field in gridview with table of one column repeating as 5 columns. Any ideas and suggestions guys. Cheers, Shilpa. Something like this. ProductImage productImage productImage productImage productImage ProductName ProductName ProductName ProductName ProductName Price price price price price I have tried this in templatefield of gridview but the data is showing as one column

    ![](<%# Eval()" width="100" height="100" border="0">

    $<%# Eval("Price") %>

    <%# Eval("ProductName") %>

    protected void DisplayProducts(int cid) { DataSet ProductList = new DataSet() ; string cmd = "StoredprocedureName" + cid; ProductList = a.SelectDSQuery(cmd); GridView1.DataSource = ProductList; GridView1.DataBind(); }

    Thanks in Advance for your help. Best Regards

    C#

  • Creating visitorID for Anonymous User
    S SharonRao

    Hello All, I am developing a shopping cart and both registered users and anonymous users can shop. The problem iam facing is with anonymous user how to create a visitorId so that i can link them to shopping cart. Visitor ID should be unique ie for every user, do i use session for this. Any suggestions guys. Best Regards, Shilpa.:)

    Thanks in Advance for your help. Best Regards

    C# help tutorial

  • Display LoginName from LoginControl
    S SharonRao

    Hello All, I have a web page with login control binded to custom sql membershipProvider to authorise the user. I was trying to use GetUser() method to display username but it is giving an error, I think i need to override Membership.GetUser() method as well becos i understand its not using my custom SQL membership provider to get the loginname but iam stuck dont know how to acheive that. can someone help me out here, please see code below. Login.aspx.cs protected void Login1_Authenticate(object sender, AuthenticateEventArgs e) { bool Authenticated = false; Authenticated = SiteLevelCustomAuthenticationMethod(Login1.UserName, Login1.Password); e.Authenticated = Authenticated; if (Authenticated == true) { Response.Redirect( "Welcome.aspx"); } } private bool SiteLevelCustomAuthenticationMethod(string UserName, string Password) { System.Data.SqlClient. SqlConnection Con = new System.Data.SqlClient.SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]); System.Data.SqlClient. SqlCommand Cmd = new System.Data.SqlClient.SqlCommand(); Cmd.Connection = Con; Cmd.CommandType = CommandType.StoredProcedure; try { Con.Open(); Cmd.CommandText = "name"; Cmd.Parameters.Add( "@UserName", SqlDbType.VarChar, 20); Cmd.Parameters[ "@UserName"].Value = UserName; Cmd.Parameters.Add( "@Password", SqlDbType.VarChar, 20); Cmd.Parameters[ "@Password"].Value = Password; System.Data.SqlClient. SqlDataReader reader = Cmd.ExecuteReader(CommandBehavior.CloseConnection); if (reader.HasRows) { return true; } else { return false; } } catch (Exception ex) { Console.WriteLine(ex.Message); //Return False; } throw new Exception("The method or operation is not implemented."); } Welcome.aspx.cs (After user logs in he is redirected to this page) protected void Page_Load(object sender, EventArgs e) { MembershipUser CurrentUser = Membership.GetUser(true); [This gives me an error ] Label1.Text = CurrentUser.UserName.ToString(); }

    Thanks in Advance for your help. Best Regards

    C# help database tutorial

  • Girdview Template field problem
    S SharonRao

    hello All, The template field in gridview has a html table which is binded to datasource from sql server all the data is displayed fine my question is, is it possible to display the data in two columns instead of one column, if Yes how is it done. Please see below for code, Any suggestions are appreciated.![](<%# Eval()" width="100" height="100" border="0">

    $<%# Eval("Price") %>

    <%# Eval("ProductName") %>

    Thanks in Advance for your help. Best Regards

    C# help html database sql-server sysadmin

  • Dynamic HTML Table C#
    S SharonRao

    Thanks i have done this and it works fine could you please tell me how to display the data in three columns instead of one column.![](<%# Eval()" width="120" height="100" border="0">

    $<%# Eval("Price") %>

    <%# Eval("ProductName") %> cheers, shilpa.:)

    Thanks in Advance for your help. Best Regards

    C# csharp html database sql-server sysadmin

  • Dynamic HTML Table C#
    S SharonRao

    Hello All, I was trying to create dynamic HTML table using C#. The data for the table comes from sql server filled datatable (i have succeded in this aspect), I am not able to figure out how to create HTML table with this data. Any suggestions are welcome.:)

    Thanks in Advance for your help. Best Regards

    C# csharp html database sql-server sysadmin

  • PopUp Calendar problem
    S SharonRao

    Hello, Thanks for the reply. I have changed the code in popupcalendar.aspx.vb,but it still is not working, any ideas where i have gone wrong. Protected Sub Change_Date(ByVal sender As System.Object, ByVal e As System.EventArgs) Dim strScript As String = "document.getElementByID('txtstartdate')." + control.Value + ".value = '" strScript += calDate.SelectedDate.ToLongDateString strScript += "';self.close()" strScript += "</" + "script>" RegisterClientScriptBlock("Calendar_ChangeDate", strScript) End Sub <div class="ForumSig">Thanks in Advance for your help. Best Regards</div></x-turndown>

    ASP.NET csharp html asp-net design help

  • PopUp Calendar problem
    S SharonRao

    Hello Everyone, I have made a webform in asp.net 2005 with a calendar control, please see below for code. I have another webpage with hyperlink to popupcalendar page. The problem is the second page has a masterpage and when i click the hyperlink the popupcalendar is displayed but the date selected is not being transferred to the text box in the second page, It works fine if i remove the master page link from the second page, any ideas guys whats happening here. HTML CODE - Popup Calendar: <%@ Page Language="vb" AutoEventWireup="false" Inherits="KMAttendance.PopUp" CodeFile="PopUp.aspx.vb" %> PopUp

    VB CODE-popup calendar: Imports System.Web.UI.HtmlControls.HtmlGenericControl Namespace KMAttendance Partial Class PopUp Inherits System.Web.UI.Page Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'control.Value = Request("textbox") control.Valu

    ASP.NET csharp html asp-net design help
  • Login

  • Don't have an account? Register

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