Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Module  wrong  in none-friendlyUrl modeModule wrong in none-friendlyUrl mode
Previous
 
Next
New Post
7/23/2008 11:05 AM
 


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 11:13 AM
 

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 11:13 AM
 

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 11:21 AM
 

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/3/2008 1:57 AM
 

 

Thanks Brandon!

All is as you said

 

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Module  wrong  in none-friendlyUrl modeModule wrong in none-friendlyUrl mode


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, 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 DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out