|
i will not work bcs i place the dropdownlist inside the gridview .
|
|
|
|
|
Add a javascript function through attributes.add in cs
for(int i=0;i< gridview.rows.count;i++)
{
DropDownList ddl = (DropDownList)gridview.rows[i].cells[cellid].findcontrol('id');
ddl.attributes.add("onchange","return func("+ddl.clientid+");");
}
Send the row id from the cs file
function func(ddl)
{
//Do the validation in javascript
}
Hope that helps!!
I was born dumb!!
Programming made me laugh !!!
--sid--
|
|
|
|
|
Please check yhe beolw script code
function check(id)
{
var n=document.getElementById("grd");
var namecontrol=id.name;
var myval=new Array();
var Arr=new Array();
myval=namecontrol.split("$")
var rowindex=myval[1];
var j=rowindex
if (document.getElementById("grd_"+j+"_ddl").value == '-- SELECT --')
{
alert("Please Select Sb Code..");
document.getElementById("grd_"+j+"_ddl").focus();
return false;
}
}
|
|
|
|
|
hi,
i have multi line text(ie..address)
for example,
insert into Db(address) values('" + txtaddress.text + "')
this address contain :-
Mr.Krish,
NH Road,
India.
its show error in comma operator.
so How to insert datas with comma operator ???
plz give solution for this..
Yours,
KaNNaN
-----------------------------------------------------------------
"Success is When Ur Signature Becomes An Autograph"
Mail To : foreverkans@gmail.com
|
|
|
|
|
user insert quary in stored procedure
or
use the insert command following like this
;
cmd.Parameters.AddWithValue("@RegFirstAddress", txtFirstAddress.Text);
cmd.CommandText = "insert into Tbl_Registration(RegFirstAddress) values (@RegFirstAddress)";
cmd.ExecuteNonQuery();
|
|
|
|
|
How can I use calender in asp.net?I know there is control named "calander" but that shows whole calender.What I want is that it show only a button on click a calander display.
|
|
|
|
|
you can use ajax calendar extender, it will be useful for u..
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1">
....
....
<asp:textbox id="txtDatetime" runat="server"> <asp:imagebutton id="ImageButton3" runat="server"
="" imageurl="~/Images/icon-calendar.gif" causesvalidation="False">
<cc1:calendarextender id="CalendarExtender1" runat="server" format="dd/MM/yyyy" targetcontrolid="txtDatetime" popupbuttonid="ImageButton3">
<cc1:maskededitextender id="MaskedEditExtender1" runat="server"
="" targetcontrolid="txtDatetime" mask="99/99/9999">
......
......
Padmanabhan
|
|
|
|
|
But it is not working.Infact after writing this code my design of page is disappearing.
|
|
|
|
|
I have a password mode textfield and a check box and a button.After giving password in textfield when checkbox is checked i.e. do true then button is enabled.But problem is,then password doesn't exist in textfield.How i can retrieve that password when button is clicked.
|
|
|
|
|
sorry its a default property for the password field......it will automatically clears the values when any event fires....
Padmanabhan
|
|
|
|
|
In the page load event, write the following code,
yourPasswordTextBox.Attributes["value"] = yourPasswordTextBox.Text;
|
|
|
|
|
Hi, I have a grid, which has an ItemTemplate and an EditItemTemplate, my concern is how do I get the controls in the EditItemTemplate, my grid columns looked like this...
<asp:TemplateField HeaderText="Price Type" HeaderStyle-CssClass="first" SortExpression="PriceType"><br />
<ItemTemplate><br />
<asp:Label ID="lbl_pricingtype" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "PriceType[0].PriceTypeDesc[0].Description")%>'<br />
ToolTip='<%# DataBinder.Eval(Container.DataItem, "PriceType[0].PriceType")%>'></asp:Label><br />
</ItemTemplate><br />
<EditItemTemplate><br />
<asp:DropDownList ID="ddl_pricingtype" runat="server" CssClass="first" Width="90px" onchange="ddl_pricingtype_change(this.value)"><br />
<asp:ListItem Text="Please Select" Value="-1"></asp:ListItem><br />
<asp:ListItem Text="0 - Price1" Value="0"></asp:ListItem><br />
<asp:ListItem Text="1 - Price2" Value="1"></asp:ListItem><br />
<asp:ListItem Text="2 - Price3" Value="2"></asp:ListItem><br />
</asp:DropDownList><br />
</EditItemTemplate><br />
<HeaderStyle CssClass="first" /><br />
<ItemStyle CssClass="first" /><br />
</asp:TemplateField>
Now I can get the value from the ItemTemplate label using OnRowEditing event but I can't seem to find the Dropdownlist control to set the selecteditem.
|
|
|
|
|
|
|
there is a sample program in which using EditItemTemplates are given..
Padmanabhan
|
|
|
|
|
thanks dude. twas a great article.
|
|
|
|
|
its my own article.. if u like that then vote for that article...
Padmanabhan
|
|
|
|
|
Hi all,
Since i am using ajax,so to display the messages i am using ScriptManager.RegisterStartupScript. and i am getting messages but the problem is after getting message when i click ok other controls on the page doesn't work.
can any one tell me the solution for it.
Thanks in advance.
|
|
|
|
|
// I am not sure how your code looks like, but i am using like this and it works fine for me.
ClientScript.RegisterStartupScript(this.GetType(), "Open", "OpenPopup('"+ ... +"')");
Padmanabhan
|
|
|
|
|
Is there a global coding standard for asp.net development? What is it called?
|
|
|
|
|
Google[^] not working where you live?
|
|
|
|
|
I guess it isn't. If you know i would appreciate if you could share.
|
|
|
|
|
Could AnyOne Answer To MY Question?
I am using 2 reorderlist Controls.
My Module is by selecting year & State from listbox Dropdownlist, Import the data from database to the table1(Reorderlist1) W.R.To State And Year.I have to move that data to another table2(Reorderlist2).
I have to add checkbox in Table 1 & 2.By selecting Checkboxes i have to move the data from one table to another table using reordering.
QQ) How to add checkbox to the Reorderlist?after adding checkbox what is the nexy step?
Mahitha
|
|
|
|
|
mahichandu wrote: Could AnyOne Answer To MY Question?
The more descriptive your question, the better chance you have, provided someone knows an answer to your question.
mahichandu wrote: I am using 2 reorderlist Controls.
Are you talking about asp.net AJAX reorder control?
mahichandu wrote: My Module is by selecting year & State from listbox Dropdownlist, Import the data from database to the table1(Reorderlist1)
Ok, no issue here, right?
mahichandu wrote: W.R.To State And Year.I have to move that data to another table2(Reorderlist2).
Are you moving the data from table1 to table2? Why can't you load table2 in the first place?
mahichandu wrote: I have to add checkbox in Table 1 & 2.By selecting Checkboxes i have to move the data from one table to another table using reordering.
Are you trying to copy individual items or all at once?
Does this[^] helps?
|
|
|
|
|
Yes am using Ajax XOntrol Reorder List..
and am copying indivisual items from one table to another table.
Could anyone send me the code..
I din't get u load table2 in first place???
after checking records in table 1 to move into table 2 ..in bettween the table am going to add one button.
After selecting records in table 1 by clicking tht button the data should moved to table 2.
** Anyother way to move data?
Mahi
|
|
|
|