|
thnq..
suparichit
|
|
|
|
|
Does anyone know where I can get a table or list of the memory usage of various controls?
I'm working on an ASP.NET project & would rather use a label control over a disabled textbox (small water cooler debate). It seems logical to me to assume that a label control carries a smaller footprint than a textbox control.
I'm sure the difference between the two is minimal and not really worth considering, it's really more a matter of curiosity than anything else. I've done a few fruitless searches, thought someone maybe had something more readily available.
Google results for MSDN[^]
More search results[^]
I think I'm going to call my next project "Chuck Norris". It's a sure way to guarantee it's unbreakable.
• • •
But fortunately we have the nanny-state politicians who can step in to protect us poor stupid consumers, most of whom would not know a JVM from a frozen chicken. Bruce Pierson
|
|
|
|
|
Hi
I am trying an application, in that their are two DropDownList controls.Both are to be filled with the XML node items.With the selection change in the first DropDownList, second one should be populate with the corresponing result of the selection one.
I am able to populate two DropDownLists with all the nodes in the XML file but I am not getting the particular selection of First DropDownList.
My XML File is something like this.....
<NewDataSet>
<Table>
<StateCode>AK</StateCode>
<CountyName>Aleutians East</CountyName>
</Table>
<Table>
<StateCode>AK</StateCode>
<CountyName>Aleutians West</CountyName>
</Table>
<Table>
<StateCode>AK</StateCode>
<CountyName>Anchorage</CountyName>
</Table>
<Table>
<StateCode>AL</StateCode>
<CountyName>Jackson</CountyName>
</Table>
<Table>
<StateCode>AL</StateCode>
<CountyName>Jefferson</CountyName>
</Table>
<Table>
<StateCode>AL</StateCode>
<CountyName>Lamar</CountyName>
</Table>
<Table>
<StateCode>AL</StateCode>
<CountyName>Lauderdale</CountyName>
</Table>
<NewDataSet>
All StateCode will be displayed on DropDownList1 and for the corresponding StateCode selection all the CountyNames in that StateCode Should be displayed on DropDownList2,this I am not getting.
Help me out suggest me an example if possible.
I have not failed. I've just found 10,000 ways that won't work. -Thomas A. Edison
Thank u
Chandu
|
|
|
|
|
Here is one method you could use:
1.
create a "ListItemCollection" (eg. lstAllNodes) object and populate it with all the pair values (StateCode,CountyName) from your XML (the text should be StateCode and the value should be CountyName).
2.
After that you should do something like this
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
string sText = DropDownList1.SelectedItem.Text;
ListItemCollection lstCountyName = new ListItemCollection();
foreach (ListItem lstTempItem in lstAllNodes)
{
if (lstTempItem.Text == sText)
{
lstCountyName.Add(lstTempItem);
}
}
DropDownList2.DataSource = lstCountyName;
DropDownList2.DataBind();
}
Where:
-lstAllNodes is the ListItemCollection object populated with all the nodes like I said at 1.
-DropDownList1 is your first drop down list with StateCodes (be carefull to have it runat server and set AutoPostBack="true" so that the SelectedIndexChanged event may trigger)
-lstCountyName is a second ListItemCollection (it is a temporary object and it's empty at first)
it's used to bind the second drop down list with the required values
-DropDownList2 your second drop down list with CountyNames
Just call me Valy...
|
|
|
|
|
Try this
<br />
function Dataset XMLfile()<br />
{<br />
XmlDataDocument xdoc = new XmlDataDocument();<br />
return xdoc.DataSet.ReadXml(Server.MapPath("XMl.xml"));<br />
}<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
dataset ds=XMLfile();<br />
dd1.datasource=ds;<br />
dd1.datatextField="StateCode";<br />
dd1.databind();<br />
}<br />
<br />
<br />
protected void dd2_SelectedIndexChanged(object sender, EventArgs e)<br />
{<br />
dataset ds=XMLfile();<br />
datarow[] dr=ds.table.select("StateCode='"+dd1.selectedItem.Text+"'");<br />
datatable tb1; <br />
foreach(datarow dr1 in dr)<br />
tb1.ImportRow(dr1);<br />
<br />
dd2.datasource=tb1;<br />
dd2.datatextfield="CountyName"<br />
dd2.databind();<br />
}<br />
<br />
Best Regard
Pathan
GOD HELP THOSE WHO HELP THEMSELVES
|
|
|
|
|
Hi,
Ive created an SqlDataSource on my page using VS2005 (ASP.Net 2.0 c#), that gets infor from an SQL2005 DB as a DataSet. How do i capture / use this data in the codebehind?
I am ok with capturing this data in the CS file when using a DataReader, but for this problem i need to use a DataSet. How do you grab the data in the DataSet, so its rows etc can be counted and used in the codebehind ?
Please help.
Thanks.
|
|
|
|
|
Come on, this is basic stuff - get a book or do some research on the 'net type "dataset" into google for starters) - before asking people here to donate their time to you for free, you really ought to do some work yourself.
Fred
|
|
|
|
|
Yikes!
Friendly!!!
As it happens Fred i spend a heck of a lot of time helping people out in return in various ways and websites. Surely the whole point of a forum is for people to be able to ask questions and share there knowledge with people who are having difficulties.
|
|
|
|
|
munklefish wrote: i spend a heck of a lot of time helping people out
So do I....
Sorry, but your question is pretty general, and with a little research you can find plenty of tutorials and sample code to help you understand your needs already on the net.
I feel that it is incumbent on users to do some research themselves first, and then only ask questions if they are still stuck on particular points, rather than ask other users here to provode them with all the work.
|
|
|
|
|
Frank!
Perhaps you should read my post then. All i need is help in grabbing the data from the SqlDataSource to the codebehind file so i can work with it. This is far from expecting someone to do it all for me.
For example if my SwlDatasource was providing data as a Reader i would use:
SqlDataReader reader9 = (SqlDataReader)<br />
SqlDataSource9.Select(DataSourceSelectArguments.Empty);<br />
<br />
if(reader9.Read())<br />
{ <br />
<br />
Label1.Text = Convert.ToString(reader9["Log_Pass"]);<br />
<br />
}<br />
reader9.Close();
However i need the data as a DataSet, hence my SqlDataSource is set-up via Vis Studio to provide the data as a DataSet. So all im asking is how i get this from the CS file?
If my question is so annoying for you you should have ignored it. However it would have been much quicker, and easier and less time consuming to have answered me rather than wasting your time complaining!
Plus it would have made me happy, and made your self happy having helped someone! I guess your a typical example of the selfish angst society we are living in today.
Thanks for your time!
|
|
|
|
|
If your dataset is called "ds" then
Loop through the records from counter =0 to ds.Tables(tableName).Rows.Count-1
and then:
Label1.Text = Convert.ToString(ds.Tables(tableName).Rows(counter)(columnName or columnIndex));
Fred
|
|
|
|
|
Hi
Can any one suggest me the good book for c#2.0
Thanks
Hari
|
|
|
|
|
Wrox or Unleased
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
"A Programmer Introduction to C# 2.0 third Edition by Apress" The Authors were Eric Gunnerson and Nick Wienholt.
Regards,
Satips.
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Walk beside me, and just be my friend. - Albert Camus
|
|
|
|
|
Depends on what part of the framework you want to learn as well as how much you currently know.
Here[^] are a few (about 2000) search results from MSDN for your perusal.
I think I'm going to call my next project "Chuck Norris". It's a sure way to guarantee it's unbreakable.
• • •
But fortunately we have the nanny-state politicians who can step in to protect us poor stupid consumers, most of whom would not know a JVM from a frozen chicken. Bruce Pierson
|
|
|
|
|
|
i have a link called chat. if i press the link, that chat page should open in a popup and in that popup i have to see only the body of my page (no address bar and also no other bars). and i need to set height and width of that popup.
plz any one help me...
Pradeep Reddy
|
|
|
|
|
Please go through
window.open(url....)
in Javascript
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
thank u...
Pradeep Reddy
|
|
|
|
|
how to find length of div and how to compare privies and present length of div
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
9313077379
|
|
|
|
|
You can specify the length of a div. Otherwise, I'm not sure if there's a property on the client side, but unless you store that property ( probably in a hidden field ), and store it in a control that has runat="server", you're not going to be able to persist it between postbacks. You're not going to find out on the server side, I would not think, as the same div can have different widths, depending on the browser.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Piyush Vardhan Singh wrote: length of div
Did you mean its width and height or length of InnerText ?
|
|
|
|
|
HI experts,
I had a masterpage in one website and woukld like to give reference of the same masterpage to the page in another website which is under the same solution.
Kindly help me in puuting out this...........
|
|
|
|
|
Copy/Paste.
I think I'm going to call my next project "Chuck Norris". It's a sure way to guarantee it's unbreakable.
• • •
But fortunately we have the nanny-state politicians who can step in to protect us poor stupid consumers, most of whom would not know a JVM from a frozen chicken. Bruce Pierson
|
|
|
|
|
honeyss wrote: same masterpage to the page in another website
I don't think you would be able to share like that.
|
|
|
|