Austin8159 Posted November 7, 2006 Share Posted November 7, 2006 basically i need to know everything. I use asp.net, and i need a page that is comic.aspx?num=1 and then num=2 and so on each showing a different jpeg. help is appreciated Link to comment Share on other sites More sharing options...
aspnetguy Posted November 7, 2006 Share Posted November 7, 2006 I have no idea what you are asking??? Link to comment Share on other sites More sharing options...
Lulzim Posted November 7, 2006 Share Posted November 7, 2006 as i understood, you have a file comic.aspxwhen the query string is comic.aspx?num=1 somewhere in its content will show e.g. 1.jpgcomic.aspx?num=2 --> 2.jpg and so on...i don't know anything at all in asp.net so wait a little, someone else would help you Link to comment Share on other sites More sharing options...
jesh Posted November 8, 2006 Share Posted November 8, 2006 as i understood, you have a file comic.aspxwhen the query string is comic.aspx?num=1 somewhere in its content will show e.g. 1.jpgcomic.aspx?num=2 --> 2.jpg and so on...If that's the case, something like this could work:protected void Page_Load(object sender, EventArgs e){ int num; string imagePath = String.Empty; if(Request["num"] != null) { int.TryParse(Request["num"], out num); } switch(num) { case 1: // num was equal to 1 imagePath = "somevalue.jpg"; break; case 2: // num was equal to 2 imagePath = "someothervalue.jpg"; break; case 0: default: imagePath = "default.jpg"; break; } // if you had <img id="myImage" runat="server" alt="" /> // in your page, you could use this to set the src. myImage.Src = imagePath;} Link to comment Share on other sites More sharing options...
pulpfiction Posted November 8, 2006 Share Posted November 8, 2006 Little bit more about query string...http://www.codeproject.com/aspnet/QueryString.asp Link to comment Share on other sites More sharing options...
Austin8159 Posted November 9, 2006 Author Share Posted November 9, 2006 Wow. Thanks all you guys soo much. YAY! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now