Click here to Skip to main content
15,909,835 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Populate ListBox with XML Data? Pin
Imran Khan Pathan9-Aug-07 23:57
Imran Khan Pathan9-Aug-07 23:57 
GeneralRe: Populate ListBox with XML Data? Pin
chand1010-Aug-07 0:42
chand1010-Aug-07 0:42 
GeneralRe: Populate ListBox with XML Data? Pin
Imran Khan Pathan10-Aug-07 1:27
Imran Khan Pathan10-Aug-07 1:27 
AnswerRe: Populate ListBox with XML Data? Pin
Piyush Vardhan Singh9-Aug-07 23:46
Piyush Vardhan Singh9-Aug-07 23:46 
GeneralRe: Populate ListBox with XML Data? Pin
Piyush Vardhan Singh9-Aug-07 23:55
Piyush Vardhan Singh9-Aug-07 23:55 
GeneralRe: Populate ListBox with XML Data? Pin
chand1010-Aug-07 0:04
chand1010-Aug-07 0:04 
Questionvirtual directory to install a web service - error during installation Pin
steve_rm9-Aug-07 22:27
steve_rm9-Aug-07 22:27 
QuestionControl state Pin
Sohaib_pak9-Aug-07 22:26
Sohaib_pak9-Aug-07 22:26 
Hi to all,
When i change the state of asp.net checkboxlist using javascript, code behind is not getting the currently change state of control,

actually i have checkboxlist control of asp.net with 3 members, agaisnt them i have 3 dropdownlist controls of asp.net, when i check first check box dropdownlist no.1 enable and vice versa, but when i enable the dropdownlist using javascript, code behind dont consider it as enable, in code behind i do disable dropdownlist and using javascript i want to enable or disable them.
Java script function which i am using,
------
function Toggle()
{
var TB = document.getElementById('chk_list').childNodes[0];
var d1 = document.getElementById("ddl_mbbs");
var d2 = document.getElementById("ddl_fcps");
var d3 = document.getElementById("ddl_dlo");
var d4 = document.getElementById("ddl_other");
var t = document.getElementById("txtOthers");

for (var i=0;i<tb.childnodes.length; i++)
="" {
="" var="" currenttd="TB.childNodes[i].childNodes[0];
" listcontrol="currentTd.childNodes[0];
"
="" if="" (="" i="=" 0="" )
="" listcontrol.checked="=" true="" d1.disabled="false;
" else
="" }
="" 1="" d2.disabled="false;
" }="" 2="" d3.disabled="false;
" 3="" d4.disabled="false;
" t.disabled="false;
" }
<="" script="">
----------
And code behind is

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

chk_list.Items(0).Attributes.Add("onclick", "ToggleTextbox();")
chk_list.Items(1).Attributes.Add("onclick", "ToggleTextbox();")
chk_list.Items(2).Attributes.Add("onclick", "ToggleTextbox();")
chk_list.Items(3).Attributes.Add("onclick", "ToggleTextbox();")
If Not IsPostBack Then
add_years()
chk_box()
End If
End Sub

Sub add_years()
Dim i As Integer = 1930
For i = 1930 To Now.Year
ddl_mbbs.Items.Add(i)
ddl_fcps.Items.Add(i)
ddl_dlo.Items.Add(i)
ddl_other.Items.Add(i)
Next
End Sub

Sub chk_box()

ddl_mbbs.Enabled = False
txtOthers.Enabled = False
ddl_fcps.Enabled = False
ddl_dlo.Enabled = False
ddl_other.Enabled = False

End Sub

Protected Sub btn_submit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_submit.Click
If ddl_mbbs.SelectedValue = "None" Then
lblerr.Text = "Enter Qualification."
Else
Session.Add("fname", Txt_fname.Text)

If ddl_mbbs.Enabled = True Then
Session.Add("mbbs", ddl_mbbs.SelectedValue)
Else
Session.Add("mbbs", -1)
End If

If txtOthers.Enabled = True Then
Session.Add("mcps", ddl_other.SelectedValue)
Session.Add("str_others", txtOthers.Text)
Else
Session.Add("mcps", -1) '---------------Change mcps = -1
End If

If ddl_fcps.Enabled = True Then
Session.Add("fcps", ddl_fcps.SelectedValue)
Else
Session.Add("fcps", -1)
End If

If ddl_dlo.Enabled = True Then
Session.Add("dlo", ddl_dlo.SelectedValue)
Else
Session.Add("dlo", -1)
End If

Response.Redirect("regDoc_1.aspx")

End If

End Sub
-----------------------
If someone could helpConfused | :confused:
QuestionHow to display xml data in hierarchial grid in asp.net application Pin
Pravat Sharma9-Aug-07 21:49
Pravat Sharma9-Aug-07 21:49 
Questionip-address Pin
Sonia Gupta9-Aug-07 21:38
Sonia Gupta9-Aug-07 21:38 
AnswerRe: ip-address Pin
Talal Sultan9-Aug-07 22:37
Talal Sultan9-Aug-07 22:37 
QuestionUsercontrol's property wasn't changed by inside event... Pin
kokain9-Aug-07 21:31
kokain9-Aug-07 21:31 
AnswerRe: Usercontrol's property wasn't changed by inside event... Pin
N a v a n e e t h9-Aug-07 23:34
N a v a n e e t h9-Aug-07 23:34 
GeneralRe: Usercontrol's property wasn't changed by inside event... Pin
kokain9-Aug-07 23:41
kokain9-Aug-07 23:41 
Questionviewstate Pin
Sonia Gupta9-Aug-07 21:28
Sonia Gupta9-Aug-07 21:28 
AnswerRe: viewstate Pin
SHatchard9-Aug-07 21:36
SHatchard9-Aug-07 21:36 
GeneralRe: viewstate Pin
Sonia Gupta9-Aug-07 21:42
Sonia Gupta9-Aug-07 21:42 
GeneralRe: viewstate Pin
SHatchard9-Aug-07 21:56
SHatchard9-Aug-07 21:56 
GeneralRe: viewstate Pin
Sonia Gupta9-Aug-07 22:14
Sonia Gupta9-Aug-07 22:14 
GeneralRe: viewstate Pin
N a v a n e e t h9-Aug-07 23:06
N a v a n e e t h9-Aug-07 23:06 
AnswerRe: viewstate Pin
Imran Khan Pathan9-Aug-07 23:14
Imran Khan Pathan9-Aug-07 23:14 
Questioncan we save and retrieve the value from appsetting in encrypted form. [modified] Pin
Piyush Vardhan Singh9-Aug-07 21:02
Piyush Vardhan Singh9-Aug-07 21:02 
AnswerRe: can we save and retrieve the value from appsetting in encrypted form. Pin
N a v a n e e t h9-Aug-07 23:07
N a v a n e e t h9-Aug-07 23:07 
Questionpage refreshment Pin
saravanan059-Aug-07 20:23
saravanan059-Aug-07 20:23 
AnswerRe: page refreshment Pin
N a v a n e e t h9-Aug-07 20:27
N a v a n e e t h9-Aug-07 20:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.