.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

getting values of month in a control

Posted By:      Posted Date: October 13, 2010    Points: 0   Category :ASP.Net

<form id="form1" runat="server">
    <input type="hidden" id="hdnDay" runat="server" />
    <asp:DropDownList ID="ddlMonth" runat="server" onchange

View Complete Post

More Related Resource Links

Applying custom CSS to the MOSS 2007 Calendar control Month view



I have a requirement to use the MOSS 2007 Calendar Control - month view is to apply a custom css to have a look and feel as per our requirements.

We tried applying the custom css to the MOSS 2007 calendar control - month view, it does take the custom css and applies it, but when i click on any date and come back to the calendar control, it changes the CSS of the MOSS calendar control back to the default one.

Let me know if anyone has any suggestion on  how to customize the calendar control for css for our intranet application.

Your response would be highly appreciated.






Help with updating database with values from Repeater control using c#


Hello, I'm new to ASP.NET 3.5 with C#. I really need some help.

I used a Repeater control to create a simple (editable) list where, when a user logs in, they can edit their list of expenses.  The ASP page works fine.

 My issue is with the code-behind.  I am really confused with how to extract the values from the repeater control. The FindControl method does not seem to be working.  Also, the code I am using resets my 'Amount' values back to 0.00. (0.00 is the amount the user sees when they first encounter the page).

 Here's a portion of the code on the ASP page:

<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1"





<td><asp:Label ID="lblExpId" runat="server"  Text='<%# Bind("ExpId") %>'></asp:Label> </td>

 <td><asp:Textbox ID="lblExpense" runat="server" Width= "190px" Text='<%# Bind("ExpenseName") %>'></asp:Textbox> </td>

 <td><asp:Textbox ID="txtAmount" runat="server" Width= "100px"

Control Values When Returning to Page


Why do controls value not persist when returning to a page (e.g. via browser back button)?  If I set control values without utilizing a post back the controls will maintain their last value when I return to the page.  If I set a control value and then call a post back, the control value is reset to the default value when returning.

I have many pages with a gridview, and a textbox which is used to filter the gridview contents.  I set the filter textbox, filter the gridview (postback), go to another page, and when I return to the gridview page (via back button), my filter textbox is reset empty, and the gridview is the original (unfiltered) data.

What concept am I missing here?

Thanks in advance...

Values in user control fields empty when AutoEventWireup=true ?

As a BizTalk developer I'm trying to build a ASP.NET website so some obvious things might be new to me (so please be gentle). I have a web form and I have a user control on it. This user control contains a panel with some user properties that are to be stored in a database. So far nothing fancy. The user control itself contains a panel and is working fine (all code to retrieve and store the values is working). I used the default settings of creating a user control and one of them was AutoEventWireup=true. This works fine because I also have some dropdown boxes (and other fields) that need to be filled with values from the database and that happens in the Page_load event. The panel specifies the 'DefaultButton' which calls a method when clicked to save the values after the user has changed them. On this click the code of the method is called, I confirmed that, but I found out that the values of my controls on the user control (for example the Textbox control) are empty. As a non-ASP.NET developer I couldn't figure out why. So I changed some settings like AutoEventWireup to false. Off course this resulted in my dropdown boxes no longer to be initially filled, but my surprise was big to find out my controls actually contained the values the user typed in. Logically I need both the values and th

Hiding other month dates in ASP .Net Calendar Control

Often we need ASP .Net calendar control in our webpages. Most of the times we require navigation in between dates of the calendar control but there can be a requirement that when we want that users should not be able to select dates from month other than the current month.Some people might be thinking in mind that Microsoft has provided theShowNextPrevMonth property of a calendar control which can be set to false in order to disable the navigation in between months. Ok, this will disable navigation but what about the dates of adjacent months shown in current month?Following is the output of a normal Calendar control when ShowNextPrevMonth is not set to false.Note the red circles in above image. July and September will allow you to navigate through other months and red circles below will allow you to select dates of adjacent months.Ok now we set the ShowNextPrevMonth property to false and see the output. Following is the output in this case.So setting out the ShowNextPrevMonth property has disabled the July and Septemberlinks but dates of adjacent months are still there which can be selected as well. How to disable/hide these? Unfortunately there is no such default property provided using which one can disable or hide these dates but fortunately doing this using code is not a complex task. Use following code a

Accessing a row's dropdownlist values AFTER the gridview control is in Edit mode

Hello, I have a gridview control. When it goes into Edit mode, there are 3 dropdownlists in one cell that are populated by separate stored procedures during the RowDataBound event. The 1st dropdownlist's value is used as a parameter to determine what the 2nd dropdownlist is populated with. The 2nd dropdownlist's value is used as a parameter to determine what the 3rd dropdownlist is populated with. Everything works fine when the row is first put into Edit mode. While I'm in Edit mode and I change the selection in the 1st dropdownlist, how do I access the control so I can feed this new parameter to the 2nd dropdownlist? I have the first 2 dropdownlists set for AutoPostBack so that the Page_Load event is fired when the user changes a value. I know how to get access to these controls via the FindControl method when the row is being databound but how do I find the control during the Page_Load event? Thanks for any help!!!   Penny  

WPF control size is larger than explicitly set width and height values.

I created a Canvas with fixed Width and Height (256x256). Next to it I put an Image control displaying a 256x256 texture without stretching. How is it possible that actual sizes of both controls on the screen differ so much? Here - is the screenshot illustrating size mismatch. And here - the TestLines256.png in case someone liked to check it (and maybe point out that I'm stupid and this texture is 180x180 and not 256x256 as I claimed). XAML with creation of the controls:   <Window x:Class="OversizedQuad.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" SizeToContent="WidthAndHeight"> <StackPanel Orientation="Horizontal"> <Canvas Width="256" Height="256" Background="Red" /> <Image Stretch="None" Source="TestLines256.png" /> </StackPanel>

get disable control values during postback

 Hi, I have a page it contains some criteria part based on criteria click upon generate button data will displayed on gird page also contains modify button where user can modify the grid data once user clicks modify button the selected criteria part will disable everything works as expected.. but i am not getting the disable control values during postback how to get the values during postback?   Thanks Maverick  

Calender control to display dates of one month only

How to make calender control to display dates of one month only like for month of June it shows 25 to 31 of May and 1 to 5 of July. like this-   25 26 27 28 29 30 31 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 2 3 4 5   I want it to be displayed like this- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30   Any ideas

How to bind GroupBy Values in Nested Repater Control


In a dataset i m getting values like this

IdApplication    ApplicationDesc    Permissions

1                       User                      Add

1                       User                      Delete

1                       User                      Update

2                       Role                       Add

2                      Role&n

Selecting current,previus month values


hi friends,

consider that i have columns like tax_amount,item_amount,month,year in a table..

i want to get

current month & year - tax_amount,item_amount

previus month and current year- tax_amount,item_amount

current month &  previus year - tax_amount,item_amount

how to get all the values in a single select query.

i am waiting for ur reply..

How to read control id and values from pdf file



 I have requirement like admin will uploads some pdf files ,which contain text box ,check box ...,

similarly we will have master table which contain some matched fields.

If pdf fields mached with master table fields then i will store mached fields pdf control id's in data base , next time if i open this pdf file i need to auto fill this matched fields in pdf file.

Can any one gudie me right direction please.

How to get gridview control row values


I have a gridview with a dropdownlist (ddlGrade) in one column and a textbox (txtText) and checkbox(cbxCheck) in another.

When the checkbox is checked I to fire an event that will use the data from other controls in that row.

In the method can get the checkbox value using:

public void onCheckedChanged_CheckedInfo(object sender, EventArgs e)

           Checkbox cbxChecked = (Checkbox)sender;


My question is... how do I get the value of the other two controls that are in the same row (dropdownlist and the textbox) at the same time? But not the values from any other rows?

Thanks, Travis

People Picker control used in ASP.Net wizard control. Loses values on Postback?


I am using a people picker control in a custom visual web part with Visual Studio 2010, Sharepoint 2010.

The people picker control is on an asp.net wizard control.

On the wizard step with the people picker control, after postback the people picker control has selected values.

But when clicking the next or previous buttons of the wizard control, the people picker control does not retain its selected values.


Microsoft.SharePoint.WebControls.PeopleEditor pe

pe.AllowTypeIn = true;
pe.AutoPostBack = true;
pe.AllowEmpty = true;
pe.MultiSelect = false;
pe.SharePointGroup = "My SP Group Name";
pe.SelectionSet = "SPGroup";
pe.ValidatorEnabled = true;
pe.CommaSeparatedAccounts = pe.CommaSeparatedAccounts;

Any suggestions?


script for getting values in hidden control


function testday()

& called this function onchange="testday();"
H_day is a hidden control

but i am not getting the value in it  

ajax calendar control get closed on month selection



   I have following problem

   1) When I click on Ajax calendar control month "Previous" or "Next" arro button calendar control get closed without date selection.

     what is problem can any one tell me and solution?  plz.




ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend