r1pt1de
11-20-2006, 12:14 PM
Hey guys I hope this is where this is supposed to be :P.
I am building a site for work, and all the code so far has been written in C# in the code behind pages. I am slightly new to this but learning a lot quickly.
Ok here is the scenario. I have a main start page that the user will make a few selections on. That page sends 2 variables to a new page based on the selections.
string type="";
string imageurl = "";
if (H_Duct.Checked)
{
if (H_Coil.SelectedValue == "1")
type = "H3D1C";
else if (H_Coil.SelectedValue == "2")
type = "H3D2C";
else if (H_Coil.SelectedValue == "3")
type = "H3D3C";
}
imageurl = "~/images/" + type + ".gif";
testing.NavigateUrl = "main.aspx?type=" + type + "&imageurl=" + imageurl;
Thats the code that is passing the values. This is working just fine, and im able to change all the form fields dynamically based on that. I also need to have the page determine which image to display based on those selections i know its passing the URL, and I know the page is getting it (debug with break mode is nice). But for some reason I can not get it to display the image. here is the code I cuttently have...
protected void Page_Load(object sender, EventArgs e)
{
string type = Request.QueryString["type"].ToString();
if (duct_image.ImageUrl == "")
{
string imageurl = Request.QueryString["imageurl"].ToString();
duct_image.ImageUrl = imageurl;
}
Now, I know its passing it right, and I know that the line to set the duct_image URL is working due to stopping it in break mode. Just cant get it to display =(.
If anyone could help me out with this i would be very greatful. Thanks in advance
I am building a site for work, and all the code so far has been written in C# in the code behind pages. I am slightly new to this but learning a lot quickly.
Ok here is the scenario. I have a main start page that the user will make a few selections on. That page sends 2 variables to a new page based on the selections.
string type="";
string imageurl = "";
if (H_Duct.Checked)
{
if (H_Coil.SelectedValue == "1")
type = "H3D1C";
else if (H_Coil.SelectedValue == "2")
type = "H3D2C";
else if (H_Coil.SelectedValue == "3")
type = "H3D3C";
}
imageurl = "~/images/" + type + ".gif";
testing.NavigateUrl = "main.aspx?type=" + type + "&imageurl=" + imageurl;
Thats the code that is passing the values. This is working just fine, and im able to change all the form fields dynamically based on that. I also need to have the page determine which image to display based on those selections i know its passing the URL, and I know the page is getting it (debug with break mode is nice). But for some reason I can not get it to display the image. here is the code I cuttently have...
protected void Page_Load(object sender, EventArgs e)
{
string type = Request.QueryString["type"].ToString();
if (duct_image.ImageUrl == "")
{
string imageurl = Request.QueryString["imageurl"].ToString();
duct_image.ImageUrl = imageurl;
}
Now, I know its passing it right, and I know that the line to set the duct_image URL is working due to stopping it in break mode. Just cant get it to display =(.
If anyone could help me out with this i would be very greatful. Thanks in advance