| |

VerySource

 Forgot password?
 Register
Search
View: 566|Reply: 0

Ask Duwamish7 for a piece of code

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-7 10:50:01
| Show all posts |Read mode
Response.Redirect ((new StringBuilder (PageBase.UrlBase))
                            .Append ("/ searchresults.aspx? Type =")
                            .Append (index)
                            .Append ("&fullType =")
                            .Append (Server.HtmlEncode (SearchDropDownList.Items [index] .Text))
                            .Append ("&text =")
                            .Append (Server.UrlEncode (searchText)). ToString (), false);
In the above code, why add Response.Redirect ((new StringBuilder (PageBase.UrlBase)) and then add .Append instead of placing .Append in redirect brackets? I think the following should be correct:
            Response.Redirect ((new StringBuilder (PageBase.UrlBase)
                            .Append ("/ searchresults.aspx? Type =")
                            .Append (index)
                            .Append ("&fullType =")
                            .Append (Server.HtmlEncode (SearchDropDownList.Items [index] .Text))
                            .Append ("&text =")
                            .Append (Server.UrlEncode (searchText)). ToString (), false));
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list