|
More and more people are now just ignoring all of your questions. I know I am.
|
|
|
|
|
|
You can link to that as many times as you like. It just makes you look more foolish than you already seem.
|
|
|
|
|
Please Everybody help me. I had been send this problem before two hour.
Enter the value in dropdownlist.
page_load()
{
dropdownlist1.items.insert(0,new listitem("Add New","0")
}
dropdownlist1_selectedIndexchanged()
{
if(dropdownlist1.selectedindex == 0)
{
responce.write("Asdf");
}
}
But not fired this event.
|
|
|
|
|
Adding an item to the control doesn't affect the selected index. There is no reason for the event to fire in the circumstances you describe.
Paul Marfleet
|
|
|
|
|
Perhaps u forget two things
1.To Write the below line with in if clause having page ispostback conditon.
dropdownlist1.items.insert(0,new listitem("Add New","0")
and
2. set the Autopostback property of dropdownlist to True.
hope it helps U.
Regards
Tarun Singh
Sr. Software Engineer.
mailto:tksingh@zenta.com
|
|
|
|
|
Because by default this item is selected i.e first item in Drop down is always selected
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
AutoPostBack Property is already true.
|
|
|
|
|
Gagan Deep Garg wrote: '07
AutoPostBack Property is already true.
i didn't say anything about this
See that event will fire only when selected Index changed as it is in name. And by default first item is selected so it will not fire untill you select another item
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Here is a piece of code that works fine in my system. just check with this you are doing it right...
HTML
-----
<-asp:dropdownlist id="DropDownList1" runat="server"
0nSelectedIndexChanged="dropdownlist_SelectedIndexChanged" AutoPostBack="True"></asp:dropdownlist>
Code-Behind
------------
private void Page_Load(object sender, System.EventArgs e)
{
if (!Page.IsPostBack) {
DropDownList1.Items.Insert(0, new ListItem("First", "1"));
DropDownList1.Items.Insert(1, new ListItem("Second", "2"));
DropDownList1.Items.Insert(2, new ListItem("Third", "3"));
}
}
public void dropdownlist_SelectedIndexChanged(object sender, System.EventArgs e)
{
Label1.Text = DropDownList1.SelectedItem.Text;
}
Note: SelectedIndexChanged event will fire only when you change the dropdown item.
Regards - J O H N -
|
|
|
|
|
yes I check at this lines.
|
|
|
|
|
No Go To My Pointer this function
|
|
|
|
|
Gagan Deep Garg wrote: No Go To My Pointer this function
what do you mean?
Regards - J O H N -
|
|
|
|
|
set the Debug pointer not go to debug pointer in this function.
|
|
|
|
|
I don't get exactly what you are saying?
Regards - J O H N -
|
|
|
|
|
Please add this item as follow :
dropdownlist1.items.add("abcd");
then write this code of selectedindexchanged event as follow:
int index=dropdownlist1.selectedindex();
// to confirm the desired index number pls write this code
Response.write(index.tostring());
if(index==0)
{
Response.Write("Asdf");
}
Ritesh Mogha
|
|
|
|
|
|
set AutoPostBack to true in the DropDownList
|
|
|
|
|
Hi...
I have created a text in datagride. the values in text which are in datagride has to be redirecte to new page.
krishna
-- modified at 5:38 Tuesday 30th October, 2007
|
|
|
|
|
use query string to solve ur problem.
Devjit Das
|
|
|
|
|
Thanx for ur response...
But how to use query string, i have tryed but it was not working can u pls send me some code to check...
Thanx in advance...
I need ur help
|
|
|
|
|
just tell me from where u want to click and redirect ur page from grid or button. if grid use grid_rowcommand and get ur text and redirect.
like this
Response.Redirect("abc.aspx?ID=" + ((TextBox)row
.FindControl("TextBox1")).Text);
will work.
Devjit Das.
|
|
|
|
|
I cant able to copy and past my code.....can u give ur email id plssss...
I need ur help
|
|
|
|
|
Response.Redirect("abc.aspx?ID=" + ((TextBox)row
.FindControl("TextBox1")).Text);
the abve code which u have given is not working...
the receiving(the page has to be redirect to this page) page i have given the command like..
lbl1.Text= Request.QueryString["txt1"];
krishna
|
|
|
|
|
????????????? wrote: I have created a text in datagride. the values in text which are in datagride has to be redirecte to new page.
text in Datagrid to redirect to a page? what do you mean by this?
Regards - J O H N -
|
|
|
|