Hi All,
I have 2 pages in my application(Suppose).
on First page whatever i enter in the text box i want that to be
selected as default in the drop down list in second page...
But at the same time i am populating the drop down in the second page
as follows:
string OUName = Request.QueryString["OU"].ToString();
if (OUName != null)
{
//OUName = Session["OU"].ToString();
ddlOU.SelectedValue = OUName;
}
if (ddlUser.SelectedIndex == -1)
{
butUser.Visible = true;
}
this.butUser.Attributes.Add("onclick", "pop();");
if (!IsPostBack)
{
Show();
}
<asp:DropDownList ID="ddlOU" runat="server" DataTextField="name"
DataValueField="adspath" AutoPostBack="True"
onselectedindexchanged="ddlOU_SelectedIndexChanged">
</asp:DropDownList>
And on the First page i am redirecting to the second page as follows:
protected void butSite_Click(object sender, ImageClickEventArgs e)
{
CreateOU();
string OU = Session["OU"].ToString();
Response.Redirect("NewWebSite.aspx?OU=" + OU + "");
string abc;
}
And the problem is that when the code reches the drop down it saya
object refernce error.Why is it so?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web
Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://cm.megasolutions.net/forums/default.aspx
-~----------~----~----~----~------~----~------~--~---