Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

AspDotNetStoreFront
  Ads  
Webhost4Life - $4.95 Windows Hosting
 


  Sponsors  

Meet Our Sponsors

MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
telerik
ExactTarget email software solutions
Merak Mail Server
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Module wrong in none-friendlyUrl mode
Previous Previous
 
Next Next
New Post 7/23/2008 9:05 AM
User is offline ying
57 posts
10th Ranked


Module wrong in none-friendlyUrl mode 


Hello!

I v writed a module,it work well in friendly url mode,but wrong in none-friendlyUrl mode.
It's very puzzling to me...

Thanks and reagrds!!!


--------------- it work well in friendlyUrl-------------------
http://localhost/%e5%b8%ae%e5%8a%a9/CalflyCommonformDashboard/tabid/191/ctl/Edit/mid/654/ItemID/15/mid/654/searchMode/time/CurrentPage/1/modeShow/gridView/className/0/Default.aspx?searchFrom=2008-7-9+22%3a43%3a00&searchTo=2008-7-23+22%3a43%3a00
---------------- it' wrong in this none friendlyUrl --------------------
http://localhost/Default.aspx?tabid=191&ctl=Edit&mid=654&ItemID=15&mid=654&searchMode=time&CurrentPage=1&searchFrom=2008-7-9+22%3a44%3a03&searchTo=2008-7-23+22%3a44%3a03&modeShow=gridView&className=0

----------------- it's system error information ------------
Server Error in '/' Application.
Input string was not in a correct format.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.formatException: Input string was not in a correct format.

Source Error:

Line 1272:            Dim ModuleID As Integer = -1
Line 1273:            If Not HttpContext.Current.Request.QueryString("mid") Is Nothing Then
Line 1274:                ModuleID = Integer.Parse(HttpContext.Current.Request.QueryString("mid"))
Line 1275:            End If
Line 1276:


Source File: E:\MyWork\奥飞\PATIWebSite_Source_4.8.2\Library\Components\Shared\Globals.vb    Line: 1274

 

 
New Post 7/23/2008 9:13 AM
User is offline ying
57 posts
10th Ranked


Re: Module wrong in none-friendlyUrl mode 

If imageColumn.CommandName = "Edit" Then
      Dim formatString As String = EditUrl("ItemID", "KEYFIELD", "Edit", CreateQueryString("gridView"))
       formatString = formatString.Replace("KEYFIELD", "{0}")
        imageColumn.NavigateURLformatString = formatString
End If

--------- the above url is created by these code:--------------------------

Now I find that if I write to: EditUrl("ItemID", "KEYFIELD", "Edit")

-- it works well in friendlyUrl or none friendlyUrl.

but if attached query string like above

--it only can work in friendlyUrl

Why ???

 

 

 
New Post 7/23/2008 9:13 AM
User is offline Brandon Haynes
701 posts
brandonhaynes.org
7th Ranked


Re: Module wrong in none-friendlyUrl mode 

Hi Ying,

The problem is occuring because you have "mid" specified twice in your erroring querystring: ...mid=654&ItemID=15&mid=654...

If you remove the second value, you'll find that the page works fine.

I do not, however, have enough context to help with WHY the mid is specified twice.

Hope this gets you pointed in the right direction!

Brandon


Brandon Haynes
BrandonHaynes.org
 
New Post 7/23/2008 9:21 AM
User is offline Brandon Haynes
701 posts
brandonhaynes.org
7th Ranked


Re: Module wrong in none-friendlyUrl mode 

 ying wrote

      Dim formatString As String = EditUrl("ItemID", "KEYFIELD", "Edit", CreateQueryString("gridView"))

Hi Ying,

My best guess would be that CreateQueryString("gridview") is including a mid value in its return string.  EditUrl automatically adds the mid to the resultant Url on your behalf, so there is no need to include it yourself.  As you noticed, doing so will result in an error when friendlyUrls are disabled.

Brandon


Brandon Haynes
BrandonHaynes.org
 
New Post 8/2/2008 11:57 PM
User is offline ying
57 posts
10th Ranked


Re: Module wrong in none-friendlyUrl mode 

 

Thanks Brandon!

All is as you said

 

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Module wrong in none-friendlyUrl mode
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Software Development and Integration with DNN
HNP Solutions focuses on the pragmatic use of technology and process to meet an organization's business objectives. HNP Solutions employs seasoned Enterprise and Solution Architects, Delivery Managers and QA & Business Leads. Our capabilities range from project assessments & recommendations, design & code reviews, to full program implementations. We also work with organizations in need of senior staff augmentation purposes in the areas of Enterprise and Solution architecture.
www.hnpsolutions.com
Alki Homes - Seattle, WA
Exemplary service for your Seattle Real Estate needs. It's what you deserve from your Realtor®!
www.alkihomes.com
PointClick DotNetNuke Solutions
PointClick Technologies provides high-end DNN Hosting for businesses.
PointClick.Net Hosted Solutions

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP