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
P

Pallavi Waikar

@Pallavi Waikar
About
Posts
4
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • the insert command doesnt work
    P Pallavi Waikar

    ur missing objcommand.ExecuteNonQuery(); and parenthesis in code try this one

    <script runat="server">
    protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e)
    {
    System.Data.SqlClient.SqlConnection con = new System.Data.SqlClient.SqlConnection();
    string connectionstr=@"Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\EHSAN\Documents\Visual Studio 2010\Projects\The Club\The Club\App_Data\Database1.mdf;Integrated Security=True;User Instance=True";
    con.ConnectionString=connectionstr;
    string sqlstring;
    sqlstring ="insert into Authenticate (username,password)VALUES ('"+ CreateUserWizard1.UserName+"','"+CreateUserWizard1.Password+"')";
    System.Data.SqlClient.SqlCommand objcommand = new System.Data.SqlClient.SqlCommand(sqlstring, con);
    Con.Open();
    objcommand.ExecuteNonQuery();
    Con.Close();
    Response.Redirect("~/Login.aspx");
    }
    </script>
    <asp:Content ID="Content1" ContentPlaceHolderID="cphMain" Runat="server">
    <asp:CreateUserWizard ID="CreateUserWizard1" Runat="server"
    oncreateduser="CreateUserWizard1_CreatedUser">
    </asp:CreateUserWizard>
    </asp:Content>

    Database help csharp database visual-studio sysadmin

  • display booked dates in red color in calender
    P Pallavi Waikar

    is it possible to check e.Cell.ForeColor in if then ur problem may solve.. try it for example and u have store this booked dates in database ..use this link for help http://msdn.microsoft.com/en-us/library/ms228044(v=vs.90).aspx[^]

    protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
    {
    //do databse connectivity
    //run while loop store this fromdate and todate in two variable
    //do same thing as u have done to display in red fore
    if (e.Day.Date < DateTime.Today)
    {

    e.Day.IsSelectable = false;
    e.Cell.ForeColor = System.Drawing.Color.Gray;
    }
    else
    {
    if(e.Cell.ForeColor != System.Drawing.Color.Red)
    e.Cell.ForeColor = System.Drawing.Color.Green;
    }
    if (e.Day.Date >= FromDate && e.Day.Date <= ToDate)
    {
    e.Cell.ForeColor = System.Drawing.Color.Red;
    }
    }

    Database graphics help learning

  • display booked dates in red color in calender
    P Pallavi Waikar

    it is working!!!!!!....have u set dropdownlists autopostback property to true...for this code it is required

    Database graphics help learning

  • display booked dates in red color in calender
    P Pallavi Waikar

    try this .First get from and to date in two variable then compare them

    protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
    {
    DateTime FromDate =Convert.ToDateTime(ddlFrom.SelectedValue);
    DateTime ToDate =Convert.ToDateTime(ddlTo.SelectedValue);

    if(e.Day.Date >= FromDate && e.Day.Date <= ToDate )
    {
    e.Cell.BackColor = System.Drawing.Color.Red;
    }
    }

    Database graphics help learning
  • Login

  • Don't have an account? Register

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