error in asp.net page? is not valid Virtual path? -


i developed 1 application in asp.net , working fine in locally. when upload in online giving error this.

~/user/news/completenews.aspx?newsid=-<span-style="font-weight:-bol.html' not valid virtual path.

my code in indiex page

if (e.commandname == "hollywood")         {             session["videopath"] = "~/index.aspx";             session["pagetitle"] = "back home page ";             string hollywoodnews = e.commandargument.tostring();             response.redirect("~/user/news/completenews.aspx?newsid=" + hollywoodnews.tostring().replace("","-")+ "");          } 

can u me please.

this .aspx code

  <asp:datalist id="datalist2" runat="server">     <itemtemplate>        <table cellpadding="0" cellspacing="0" align="left" valign="top">              <tr>                  <td></td>                  <td>                      <table>                          <tr>                              <td>                                  <img src="images/arrow.jpg" border="0" style="margin-right: 10px;" />                               </td>                               <td>                                   <asp:hyperlink id="lireview2" runat="server" text='<%#eval("name1") %>' navigateurl='<%# eval("name1") %>'   cssclass="linktext"> </asp:hyperlink>                               </td>                           </tr>                       </table>                   </td>               </tr>         </table>     </itemtemplate> </asp:datalist> 

it looks e.commandargument property assigning newsid querystring value isn't correct. put breakpoint in code on following line , check it's value when debugging:

string hollywoodnews = e.commandargument.tostring(); 

Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -