|
use this code to bound ur dropdownlist anjoy the coding
Dim _Doc As New System.Xml.XmlDocument
_Doc.Load("file:///C:/testxml.xml")
Dim NodeList As System.Xml.XmlNodeList = _Doc.SelectNodes("/USA/CountyUSA/CountyName")
For Each node As System.Xml.XmlNode In NodeList
Dim ss As String = node.InnerText
DropDownList1.DataSource = ss
DropDownList1.DataBind()
Next
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
|
|
|
|
|
where i stored CountyName in ss string. u store all CountyName in hash table or collection then bind drop down list(out side the for each)
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
|
|
|
|
|
Thank u for u r reply Piyush Vardhan Singh
But I am having all the County Names of different States in a single XML file.
How can I get County Names of each State in order to bind that Data to ListBox.
As I said earlier I getting that State Name in a QueryString, with that Name in the QueryString I have to get the Couty Names of that State.
How can I make this kind of selection.
I have not failed. I've just found 10,000 ways that won't work. -Thomas A. Edison
Thank u
Chandu
|
|
|
|
|
Hello,
VS 2005
I tried to follow this article about how to specify a virtual directory to install a web service project.
http://www.codeproject.com/useritems/ChangeVDirWebSetupProject.asp
In my project i am using a installer class and 1 custom action. But I don't think this would cause any problem, as it worked everytime before I added the virtual directory.
However, i get this error message during the installation.
Exception occurred while initializing the installation.
System.IO.FileNotFoundException: Could not load file or assembly.
'File:///C:\windows\System32\Software\myWebService\Website\PDA\' or one of its dependencies. The system cannot find the file specified.
If anyone has had this kind of error before, or know of a better method to specify a virtual directory to install to. Please let me know.
Many thanks,
Steve
|
|
|
|
|
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 help
|
|
|
|
|
Hi All,
How can i display xml node and sub node(only element)in multi level hierarchial grid. if any one have some sample code please send me.
My sample xml file is:
<ctfile>
<documentname>CES Student File
<ctfversion>1.1
<documentcreationdatetime>2006-01-17T14:29:48
<documentqualifier>full
<supplierid>SIMS
<sourceschool>
<lea>
<estab>
<schoolname>
<ctfpupildata>
<upn>
<surname>
<forename>
<dob>
<gender>
<basicdetails>
<preferredsurname>BATES
<preferredforename>RYAN
<ncyearactual>10
<ethnicity>WBRI
Thanks & Regards,
Pravat Sharma
Pravat Sharma
|
|
|
|
|
i want to calculate the address of the client which is accessing my website. fro that i am using the following code.
Request.UserHostAddress.ToString()
is this right
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
I don't think so, it will give you the address of the server. Try this instead:
Request.ServerVariables["REMOTE_ADDR"].ToString();
Talal
-- If this is a post that has been helpful to you, please vote for it. Thank you!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
Hi there,
I've got a problem about usercontrol in asp.net 2.0.
In my usercontrol, I've got a button and a public property. When the button is clicked, the property will be set to 1.
public partial class WebUserControl : System.Web.UI.UserControl<br />
{<br />
private int _number;<br />
<br />
public int Number {<br />
get {<br />
return this._number;<br />
}<br />
set {<br />
this._number = value;<br />
}<br />
}<br />
<br />
protected void Button1_Click(object sender, EventArgs e)<br />
{<br />
this._number = 10;<br />
}<br />
}
Then, I put this usercontrol into a page. Set its Number property to 1.
The problem is after I click the usercontrol's button, its Number property didn't change to 10
Any wrong here???
Pls help me. Thanks alot.
|
|
|
|
|
kokain wrote: this._number = 10;
You are assigning to variable, not to property
|
|
|
|
|
Hi NAvaneeth,
Whenever user get the value of the property, the _number variable is return. Anyway, the same problem when assigning to property like your opinion.
Thank you.
|
|
|
|
|
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" EnableViewState="false"%> here i have disabled the view state. i have textbox too.<asp:textbox id="TextBox1" runat="server" enableviewstate="false"> here is viewstate disabled.now the situation is when i type some text in textbox and then click the button it redirects me to another page then i click the back button i still get the text in the textbox.y this is happening so?
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
When pressing the back button in the browser the page is not reloaded but comes from a version which is essenitally cached in the browser which is why the data is still there.
|
|
|
|
|
so how can i disable the viewstate , i mean how to implement the viewstate in my program.i have 60 textboxes in the fom, i manually can't clear the textboxes at runtime.is there any property that hides the data or i need to set the textbox.text=""
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
You cant do anything when the back button is pressed since no server-side code will be executed. You can expire the page though which will ensure that the page is re-loaded from code when the back button is pressed
Response.Expires = 0
Response.Cache.SetNoStore()
Response.AppendHeader("Pragma", "no-cache")
|
|
|
|
|
thanks SHatchard, can't i do these things with the help of Enableviewstate.
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
Sonia Gupta wrote: can't i do these things with the help of Enableviewstate.
ViewStates are not used for just clearing the values. It is a mechanism used by ASP.NET to persist data on postback. If you disable viewstate for a control/page level, you won't be able to get the data entered in the textbox when page posts back.
|
|
|
|
|
U can clear all textboxes using find control.
Put all textbox in table and find out control and if control is textbox then clear it. So simple
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
can we save and retrieve the value from appsetting in encrypted form.
-- modified at 3:45 Friday 10th August, 2007
-- modified at 3:53 Friday 10th August, 2007
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
|
|
|
|
|
Piyush Vardhan Singh wrote: retrieve the value from appsetting in encrypted form.
YES. Make use of .NET cryptographic libraries
|
|
|
|
|
hi friends
I have serch option and datagrid in my page.
I have search options in top of the page and datagrid in bottom of the page.
if i give the value in search options ,the values will get from database and
display in datagrid
now i need the databind in datagrid without page refreshing
how can i achive this using AJAX with asp.net 2.0 version
if u have any code plz send me
regards
saravanan
|
|
|
|
|
|
yes
i dont know the ajax concept.
somebody told write code
somebody told using ajax control
i really confused plz help me
I use asp.net 2.0 version
i have one more doubt:
Is there any differnce between website and ajax enabled website for functionality wise.
regards
saravanan
regards
saravanan
|
|
|
|
|
18-week "Free" AJAX Programming (with Passion!) Online Course[^] this is online training for Ajax course. (but it's especially for Java developer. ) But i attended this course in first batch even I'm C# developer. I found it useful.
I'd like to suggest you to read the following section from this course.
"# Ajax Basics & Development Tools"
# JavaScript Basics and DOM APIs"
# Ajax Application Examples"
Or. buy a book...
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|