Hi iam trying to implement a calendar control.i want to design like this. i have 3 drop down list(for day,month,year) at the top followed by a calendar control. and 3 link buttons(prev,today,next) at the bottom. if i select the particular day,month and year the calendar has to display accordingly,the same should happen with the link buttons also. can anyone tell me how to do this.iam not using any ajax controls.iam using asp .net calendar control. the code goes like this.... cal.aspx... <table id="table1" width="100%"> <tr></tr> <tr> <td align="center"> <asp:DropDownList ID="cboDay" runat="server" AutoPostBack="True"> <asp:ListItem Value="1"></asp:ListItem> <asp:ListItem Value="2"></asp:ListItem> <asp:ListItem Value="3"></asp:ListItem> <asp:ListItem Value="4"></asp:ListItem> <asp:ListItem Value="5"></asp:ListItem> <asp:ListItem Value="6"></asp:ListItem> <asp:ListItem Value="7"></asp:ListItem> <asp:ListItem Value="8"></asp:ListItem> <asp:ListItem Value="9"></asp:ListItem> <asp:ListItem Value="10"></asp:ListItem> </asp:DropDownList> <asp:DropDownList ID="cboMonth" runat="server" AutoPostBack="True"> <asp:ListItem Value="January"></asp:ListItem> <asp:ListItem Value="Febraury"></asp:ListItem> <asp:ListItem Value="March"></asp:ListItem> <asp:ListItem Value="April"></asp:ListItem> <asp:ListItem Value="May"></asp:ListItem> <asp:ListItem Value="June"></asp:ListItem> <asp:ListItem Value="July"></asp:ListItem> <asp:ListItem Value="August"></asp:ListItem> <asp:ListItem Value="September"></asp:ListItem> <asp:ListItem Value="October"></asp:ListItem> <asp:ListItem Value="November"></asp:ListItem> <asp:ListItem Value="December"></asp:ListItem> </asp:DropDownList> <asp:DropDownList ID="cboYear" runat="server" AutoPostBack="True"> <asp:ListItem Value="2000"></asp:ListItem> <asp:ListItem Value="2001"></asp:ListItem> <asp:ListItem Value="2002"></asp:ListItem> <asp:ListItem Value="2003"></asp:ListItem> <asp:ListItem Value="2004"></asp:ListItem> <asp:ListItem Value="2005"></asp:ListItem> <asp:ListItem Value
chithra r
Posts
-
calendar with drop down list -
calendar control with drop down listHi iam trying to implement a calendar control.i want to design like this. i have 3 drop down list(for day,month,year) at the top followed by a calendar control. and 3 link buttons(prev,today,next) at the bottom. if i select the particular day,month and year the calendar has to display accordingly,the same should happen with the link buttons also. can anyone tell me how to do this.iam not using any ajax controls.iam using asp .net calendar control. the code goes like this.... cal.aspx... <table id="table1" width="100%"> <tr></tr> <tr> <td align="center"> <asp:DropDownList ID="cboDay" runat="server" AutoPostBack="True"> <asp:ListItem Value="1"></asp:ListItem> <asp:ListItem Value="2"></asp:ListItem> <asp:ListItem Value="3"></asp:ListItem> <asp:ListItem Value="4"></asp:ListItem> <asp:ListItem Value="5"></asp:ListItem> <asp:ListItem Value="6"></asp:ListItem> <asp:ListItem Value="7"></asp:ListItem> <asp:ListItem Value="8"></asp:ListItem> <asp:ListItem Value="9"></asp:ListItem> <asp:ListItem Value="10"></asp:ListItem> </asp:DropDownList> <asp:DropDownList ID="cboMonth" runat="server" AutoPostBack="True"> <asp:ListItem Value="January"></asp:ListItem> <asp:ListItem Value="Febraury"></asp:ListItem> <asp:ListItem Value="March"></asp:ListItem> <asp:ListItem Value="April"></asp:ListItem> <asp:ListItem Value="May"></asp:ListItem> <asp:ListItem Value="June"></asp:ListItem> <asp:ListItem Value="July"></asp:ListItem> <asp:ListItem Value="August"></asp:ListItem> <asp:ListItem Value="September"></asp:ListItem> <asp:ListItem Value="October"></asp:ListItem> <asp:ListItem Value="November"></asp:ListItem> <asp:ListItem Value="December"></asp:ListItem> </asp:DropDownList> <asp:DropDownList ID="cboYear" runat="server" AutoPostBack="True"> <asp:ListItem Value="2000"></asp:ListItem> <asp:ListItem Value="2001"></asp:ListItem> <asp:ListItem Value="2002"></asp:ListItem> <asp:ListItem Value="2003"></asp:ListItem> <asp:ListItem Value="2004"></asp:ListItem> <asp:ListItem Value="2005"></asp:ListItem> <asp:ListItem
-
first three highest salarieshi thanks for answering..can u tell me how to write(modify) this query without using TOP keyword.
pintoo
-
first three highest salarieshi all can anyone tell me how to (query to)find the first three highest salaries from a table. Example input Name Salary a 1000 b 5000 c 8000 d 11000 e 15000 f 2000 output: salary 15000 11000 8000 thanks in advance...
pintoo
-
menu controlHi all I want to create a Menu in my application.iam using menu control for that.when i use this menu control "one arrow mark is coming in between" the menu items.can anyone tell me how to remove this arrow mark.also post me a link that explains step by step process, how to create a menu control in .net(c#). any help will be appreciated. thanks in advance.
pintoo
-
drop down list selected index changed eventyes rahul it was not set to true.. thanks for the valuable suggestion. now it is working fine..
pintoo
-
drop down list selected index changed eventhi all can anyone help me in this regard..in my application iam using a drop down list and in the selected index changed event of that iam writing some code to make the controls visible false.this works fine when the page is loaded for the first time.when i select any value from the drop down next time this event is not executed.is the selected index changed event works only for the first time when the page loads?? here is the code.. ASPX page <asp:Panel ID="pnlRegions" runat="server" Height="29px" Width="500px"> <asp:Label ID="lblregion" CssClass="lbl" Font-Bold="true" runat="server" Text="Region"></asp:Label> <asp:DropDownList ID="ddlRegion" runat="server" Width="165px" OnSelectedIndexChanged="ddlRegion_SelectedIndexChanged"/> <asp:Button ID="btnFind" runat="server" Text="Find Restaurant" OnClick="btnFind_Click"/> <br /><br /> </asp:Panel> <asp:Panel ID="pnlDisplay" runat="server" > <asp:Label id="lblTotalRest" runat="server" CssClass="NormalText" Text="Total Records" Width="186px" ></asp:Label> <asp:Button id="btnDisplay" runat="server" CssClass="button" Text="Display" OnClick="btnDisplay_Click"></asp:Button> </asp:Panel> CODE BEHIND protected void ddlRegion_SelectedIndexChanged(object sender, EventArgs e) { ClearClassData(); pnlDisplay.Visible = false; } protected void btnFind_Click(object sender, EventArgs e) { grdDescList.Visible = true; pnlDisplay.Visible = true; GetRestaurant("REGION"); ClearClassData(); } the event get executed only after the find button click when i checked by putting breakpoints.. any help will be appreciated.
pintoo
-
check box inside the gridviewhave a look into my last post(posted 24th march).it is in the 5th page of c# message board. :)
pintoo
-
selecting check boxhi vimal raj it is working perfectly..thanx for your valuable suggestion and your time.
pintoo
-
check box inside the gridviewhi all i have resolved the problem.here is the code aspx page
<html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> <script type="text/javascript"> function SelectAll(id) { var frm = document.forms[0]; for (i=0;i<frm.elements.length;i++) { if (frm.elements[i].type == "checkbox") { frm.elements[i].checked = document.getElementById(id).checked; } } } </script> </head> <body> <form id="form1" runat="server"> <div> <asp:GridView ID="GridView1" runat="server" Width="400px" AutoGenerateColumns="False" OnRowDataBound="GridView1_RowDataBound"> <Columns> <asp:BoundField DataField="PersonID" HeaderText="PersonID" InsertVisible="False" ReadOnly="True" /> <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" /> <asp:TemplateField> <%--<AlternatingItemTemplate> <asp:CheckBox ID="CheckBox1" runat="server" /> </AlternatingItemTemplate>--%> <ItemTemplate> <asp:CheckBox ID="CheckBox1" runat="server" /> </ItemTemplate> <HeaderTemplate> <asp:CheckBox ID="cbSelectAll" runat="server" Text="Select All" /> </HeaderTemplate> <HeaderStyle HorizontalAlign="Left" /> <ItemStyle HorizontalAlign="Left" /> </asp:TemplateField> </Columns> </asp:GridView> </div> </form> </body> </html>
code behind protected void Page_Load(object sender, EventArgs e) { BindGrid(); } private void BindGrid() { string Connstr = "connection string"; SqlConnection Conn = new SqlConnection(Connstr); string str = "select * from emp"; SqlCommand cmd = new SqlCommand(str, Conn); Conn.Open(); DataSet ds = new DataSet(); SqlDataAdapter Adap = new SqlDataAdapter(); Adap.SelectCommand = cmd; Adap.Fi -
selecting check boxhi i have tried this link...it is not working ..iam giving the code herewith.do tell me what iam missing.. ASPX PAGE
<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Untitled Page</title> <script language="javascript" type="text/javascript"> function SelectAll(idHeaderCheckbox) { var checkboxHeader = document.getElementById(idHeaderCheckbox); var hdnCheckboxIDs = document.getElementById("hdnCheckboxID") ; var arrCheckboxIDs = hdnCheckboxIDs.value.split(","); if(checkboxHeader.checked == true) { for(var i=0 ; i < arrCheckboxIDs.length ; i++ ) { if(arrCheckboxIDs[i] != "") { var ckbItem = document.getElementById(arrCheckboxIDs[i]); ckbItem.checked = true; } } } else if(checkboxHeader.checked == false) { for(var i=0 ; i < arrCheckboxIDs.length ; i++ ) { if(arrCheckboxIDs[i] != "") { var ckbItem = document.getElementById(arrCheckboxIDs[i]); ckbItem.checked = false; } } } } </script> </head> <body> <form id="form1" runat="server"> <div> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" OnRowDataBound="GridView1_RowDataBound"> <Columns> <asp:TemplateField> <HeaderTemplate> <asp:CheckBox ID="ckbHeader" runat="server" /><br /> </HeaderTemplate> <ItemTemplate> <asp:CheckBox ID="ckbItem" runat="server" /><br /> </ItemTemplate> </asp:TemplateField> <asp:BoundField DataField="Name" HeaderText="Emp Name" /> <asp:BoundField DataField="EmpID" HeaderText="Emp Id" /> <asp:BoundField DataField="Age" HeaderText="Emp Age" /> </Columns> </asp:GridView> <input type="hidde
-
selecting check boxhi all in my application iam having a grid which contains a check box at the top and name field inside and check boxes to select the particular name.(like in mail boxes).i can select the particular checkbox if i want..till here no problem..but if i want to select all the check boxes by clicking the check box at the top(note this has to be done by clicking the check box and not by any buttons like unread button as in gmail or yahoo).can anyone give me code to do it... thanks in advance..
pintoo
-
how to reduce the size of a webpagehi all Good morning.iam now done with developing my webpage.i want to reduce the size of the webpage.currently it is of 167387 bytes.i want to reduce it.can anyone tell me is it possible ,if yes how to do it. any help will be appreciated. Thanks in advance.
pintoo
-
how to count number of records in tablehi all can anyone tell me how to count the number of records(rows)in a table without using "COUNT" aggregate function. thanx in advance.
pintoo
-
pop up window issue [modified]hi all in my application iam opening a pop up window by clicking a button and passing the values from the pop up window to parent window.everything till here works fine.but the problem is when the pop up window is in use and if click outside(in the parent window)the pop up window is not blinking but it gets minimised.i want to make the pop up window active when it in use and it has to blink when clicked outside.i have tried using showmodaldialog function also,but when using that another pop up window opens and values are not passed to parent window.iam providing the code herewith through which i opened the pop up window.can anyone help me in fixing this problem.... code string scr = @"<script> function update(elemValue) { document.getElementById('ctl00_ContentPlaceHolder3_txtName').innerText=elemValue[0]; } </script>"; // register the javascript into the Page Page.RegisterClientScriptBlock("update", scr); //add our popup onclick attribute to the desired element on the page (Here, Hyperlink1) lnkSearch.Attributes.Add("onclick", "window.open('lrs_SearchDesc.aspx',null,'left=190, top=225, height=350, width= 465, status=n o, resizable= no, scrollbars= no, toolbar= no,location= no, menubar= no');");
pintoo
modified on Friday, February 22, 2008 3:38 AM
-
asp mapshi all did anyone used asp maps(from vds technologies)in your application.if yes means explain me how to create our own maps and move an image in that..(for a vehicle tracking system project)
pintoo
-
[Message Deleted][Message Deleted]
-
binding the data to the gridhey i got it..the text box was outside the grid only..actually i used a html input field and made that field in the grid hidden..iam giving the code here which i used. and to retrieve the value txt1.Text = ((HtmlInputHidden)GvPromotion.Rows[e.NewEditIndex].FindControl("DescHiddenValue")).Value; anyway thanx for sparing your time..
pintoo
-
binding the data to the gridhey i got it..the text box was outside the grid only..actually i used a html input field and made that field in the grid hidden..iam giving the code here which i used. and to retrieve the value txt1.Text = ((HtmlInputHidden)GvPromotion.Rows[e.NewEditIndex].FindControl("DescHiddenValue")).Value;
pintoo
-
binding the data to the gridhi thanx for the reply.but i have binded the data already.i want to retrieve the data from the gridview but not from the data table directly(data is present in the grid but the visible property is set to false.)i want to retrieve the data from the grid.
pintoo