1
votes

I have multiple subdirectories in my solution that have default.aspx pages in them, so when I use the url:

http://www.mysite.com/products/

where products is a subdirectory stated above, it shows the contents of the default.aspx page located within the directory.

Whenever an initial postback occurs on the page the url changes to:

http://www.mysite.com/products/default.aspx

the event that caused the postback is fired, but no results from that event are produced i.e. (Gridview not bound with new results)

If I initially navigate to the page

http://www.mysite.com/products/default.aspx

then everything occurs as expected on the first shot. So I am assuming it has something to do with the URL im using and not specifically the code?

Any feedback on this issue would be appreciated.

Well this is executed from onclick events for buttons I have in a listview it hits the last line but does not swap the text (url changes):

Protected Sub PrepareNewReason(ByVal sender As Object, ByVal e As EventArgs)
    ListView1.EditIndex = -1
    If CType(sender, Control).ID = "addReason1" Then
        ' We are on top of the list show entry row on top
        ListView1.InsertItemPosition = InsertItemPosition.FirstItem
    Else
        ListView1.InsertItemPosition = InsertItemPosition.LastItem
    End If
    ListView1.FindControl("addReason1").Visible = False
    ListView1.FindControl("addReason2").Visible = False
    Label1.Text = "This Line was hit"
End Sub
2

2 Answers

2
votes

This probably has nothing to do with the URL changing. Try a simpler change. Put a label on the page, and change the label text from the event that fires the PostBack.

1
votes

Not sure if this will help. May be a setting in the Web.Config.