Hi friends,
i have a dropdown control inside Gridview control, on selection of values from the dropdown
a message box should Pop-Up showing the related message.
how can it be acheivable
Pl reply.
aamir
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Hemant KumarRank #1,202 · 1.5K reputationPosted Jul 5, 2012, 4:32 AM EDT
Try like this
<htmlxmlns="http://www.w3.org/1999/xhtml"><headrunat="server"><title>title><scripttype="text/javascript"src="http://code.jquery.com/jquery-1.4.1.js">script><scripttype="text/javascript">$(document).ready(function () {$('#ddl').change(function () {alert($('#ddl :selected').text());});});script>head><body><formid="form1"runat="server"><div><asp:ScriptManagerrunat="server"ID="sm1"/><asp:UpdatePanelrunat="server"ID="up1"><ContentTemplate><asp:DropDownListrunat="server"ID="ddl"><asp:ListItemText="text1"/><asp:ListItemText="text2"/>asp:DropDownList>ContentTemplate>asp:UpdatePanel>div>form>body>html>Aamir KhanRank #7,345 · 243 reputationPosted Jul 5, 2012, 9:18 AM EDT
V S N Raju KanumuriRank #8,839 · 215 reputationPosted Jul 5, 2012, 9:40 AM EDT
protected void DropDownList1_SelectedIndexChanged(System.Object sender, System.EventArgs e) { string value= (DropDownList)GridView1.Rows(GridView1.SelectedIndex).Cells(0).FindControl("DropDownList1")).SelectedValue; Respnse.Write("alert("+value+")");may be this is help to u
Aamir KhanRank #7,345 · 243 reputationPosted Jul 5, 2012, 10:22 AM EDT