|
Grid is treated like a table
Example:
function fngetvalue()
{
varTbody=document.getElementById('GRID_ID').childNodes[0]
td=varTbody.getElementsByTagName("TD")
tgname=varTbody.getElementsByTagName("INPUT")
for(i=0;i<tgname.length;i++)
{=""
="" if="" (tgname[i].type="='text')
" {
="" tgname[i].value="Text" ;
="" }
="" return="" false;
="" }=""
<div="" class="ForumSig">Best Regards
|
|
|
|
|
Hellow Everybody
ddlCategory (drop down list category) data is coming from database. I want to add Select One.. on the top of my ddlCategory then data will be come from database. How can I do it?
Waiting For Your Reply
Sarfarj Ahmed
|
|
|
|
|
comboName.Items.Insert(0, New ListItem("Select", -1))
|
|
|
|
|
<asp:dropdownlist appenddatabounditems="True" ....="">
<asp:listitem value="-1" selected="True">SELECT LOCATION
Intelligence is measured by common sense not by how many scholarly books you read.
|
|
|
|
|
Insert a new item to the list after doing a Databind of your Database Items.
DropDownList1.Items.Insert(0, New ListItem("Text","Value")
Regards - J O N -
|
|
|
|
|
John Prabhu wrote: DropDownList1.Items.Insert(0, New ListItem("Text","Value")
Missing closing tag ")".
|
|
|
|
|
oops...
DropDownList1.Items.Insert(0, New ListItem("Text","Value"))
Regards - J O N -
|
|
|
|
|
Dear John
Thanks Lot
It does work and Im going to give you maximum point
Thanks Again for Your Help
Sarfarj Ahmed
|
|
|
|
|
You're welcome
Regards - J O N -
|
|
|
|
|
hi may be this will give you much clear Idea, try this....
DropDownList1.Items.Add(New ListItem("--Select-One--", ""))
For iCount = 0 To dataTable.rows.Count - 1
DropDownList1.Items.Add(New ListItem(dt.row(i)(0).tostring(),"")
Next
It might contain some syntax errors as I am writing it without using IDE.
|
|
|
|
|
How To get the machine name?
i need to the machine name of the Client the that is browsing my web site
|
|
|
|
|
you can't.
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 )
|
|
|
|
|
I think we can use this one .
Page.Request.UserHostName
What do u think?
Happy Programming
-----------------
Abhijit Jana
Noida, India
|
|
|
|
|
System.Environment.MachineName
Intelligence is measured by common sense not by how many scholarly books you read.
|
|
|
|
|
That returns the machine name of the server.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
ROTFL !!!
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 )
|
|
|
|
|
Use HttpRequest object.
and try this one
Page.Request.UserHostName
Happy Programming
-----------------
Abhijit Jana
Noida, India
|
|
|
|
|
is it possible to diplay output in a specific position in a page without using controls in asp.net
|
|
|
|
|
No. If you do a response.Write, it always goes on the top of hte page. To position it, you need to put it inside a control that is positioned on the page where you want it.
Actually, that's not true. You could use CSS to position something, and then you can emit it where-ever you want, so long as you emit a div or something that uses the CSS class that positions it. But, it's really much nicer to use a control IMO.
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 )
|
|
|
|
|
I am fetching product name and the corresponding link from the database i want to display the product name and when click on it i have to go the corresponding page.search button ia also there.the products similar to that we typed will also have to display.that's why i am using response.write.But I don't want to display these at the beginning of the page.if anyone have a solution for this plse send.
|
|
|
|
|
is it possible to diplay output in a specific position in a page without using controls in asp.net.I am fetching product name and the corresponding link from the database i want to display the product name and when click on it i have to go the corresponding page.search button ia also there.the products similar to that we typed will also have to display.that's why i am using response.write.But I don't want to display these at the beginning of the page.if anyone have a solution for this plse send.
|
|
|
|
|
hi all,
please help me i this, i wnt to make all text boxes inside the page are readonly true.but insted of doing for each textbox i want find all the text boxes in page and make at once read only true . i am using this code to find
foreach(Controls control in Page.Controls)
{
if (control is TextBox)
{
}
}
but unable to get common property of text boxes is there any way please help me.
Thanks And Regards,
GuruKiran
|
|
|
|
|
foreach(Controls control in Page.Controls)
{
if (control is TextBox)
{
(control as TextBox).ReadOnly = true;
}
}
Does this work....
Intelligence is measured by common sense not by how many scholarly books you read.
|
|
|
|
|
foreach (Control ctrl in c.Controls) {
if ((ctrl.GetType() == TextBox)) {
((TextBox)(ctrl)).ReadOnly = true;
}
}
Regards - J O N -
|
|
|
|
|
Hi to all- CaN anyone please tell.
My question is to those who are saying as follows
I have read in certain post something like below.
In below code we can not use 'is' and it is better to use 'as'.
Just give a look at below code.
I think Christian Graus has told someone to use 'as' instead of 'is'.
So please justify this. Why should i use 'as'
<br />
foreach(Control c in Page.Controls)<br />
{<br />
foreach(Control ctrl in c.Controls)<br />
{<br />
if(ctrl is TextBox)<br />
{<br />
((TextBox)ctrl).Enabled = false;<br />
}<br />
else if(ctrl is CheckBox)<br />
{<br />
((CheckBox)ctrl).Enabled = false;<br />
}<br />
}<br />
}<br />
Thanks
-- modified at 6:04 Monday 22nd October, 2007
Believe Yourself :->
|
|
|
|