Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 366691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T13:39:24+00:00 2026-05-12T13:39:24+00:00

In my webpage I have two dropdown controls for namely ddlmonth and ddldays (

  • 0

In my webpage I have two dropdown controls for namely ddlmonth and ddldays ( for month & days)
I write a method for current month in ddlmonth and current day in ddldays and i call that method in page load event it working fien but when i select (in ddlmonth ) different month and different day and insert into database the values inserted in database is current month and current day, actually i select different month and day

This is my code

This is the method for current date display in ddlmonth dropdwon control and ddlday

public void getMonth()
{
    ddlmonth.SelectedIndex = DateTime.Now.Month -1;
    ddldate.SelectedIndex = DateTime.Now.Day - 1;
}

I call this in page load

protected void Page_Load(object sender, EventArgs e)
{
    getMonth();
}

If I call the getMonth method in postback

protected void Page_Load(object sender, EventArgs e)
{
    if(!ispostback)
    {
        getMonth();
    }
}

it not displaying the current month and date

without postback it is working

When I select different month and day and insert into database it is taking current month and day

Please help me

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T13:39:24+00:00Added an answer on May 12, 2026 at 1:39 pm

    You can try to use Request.Form[“ddlmonth”] and Request.Form[“ddlday”] to retrieve the values.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two questions. In my webpage (developed by me), I use the GET
I have a webpage with two side by side overflowing divs that split the
I have a webpage where there are two buttons and a textbox. When the
I have some localization problems in my webpage. There are basically two problems (that
I have a webpage with two radiobuttons and a dropdownlist as follows: <div class=sectionheader>Course
I have two divs for different sections of my webpage, a working and a
If I have two DIV's on my webpage which are larger than a browser
I had created a webpage using asp.net mvc3 razor. I have two master pages
On my webpage I have two buttons, how to identify which one is which?
I have two DIV elements on a webpage. I want to remove inner html

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.