VBForums - ASP.NET And ASP.NET Corehttp://www.vbforums.com/
Drop in here to discuss anything and everything about ASP.NETenThu, 24 May 2018 16:40:42 GMTvBulletin60http://www.vbforums.com/images/misc/rss.pngVBForums - ASP.NET And ASP.NET Corehttp://www.vbforums.com/
http://www.vbforums.com/showthread.php?862451-RESOLVED-PDF-Encoding&goto=newpost
Fri, 11 May 2018 16:16:24 GMTHey all,
I am writing a desktop app and an ASP page that will work together. The ASP page will run on my customer's server and the app will run their vendors' computers. The app will allow the vendor to see what work is coming in the near future.

When the app is run, I go through a series of login and authentication steps before the vendor gets to a list of part numbers and dates. When they click one of the part numbers, the app will send a post request to the ASP page which will then return the PDF drawing to the vendor. This all works fine except the PDF page is all black when I open in the default pdf viewer on the desktop machine.

When I run the ASP page in the debugger, the browser displays the PDF correctly, so I'm pretty sure the problem lies on the desktop side; probably in the decoding.

Here is the code I use to send the pdf from the ASP page (c#.. moved away from vb last year)....

Any help would be greatly appreciated.
]]>ASP.NET And ASP.NET Corekebohttp://www.vbforums.com/showthread.php?862451-RESOLVED-PDF-EncodingVS 2008 Any way to know from where my page was called?http://www.vbforums.com/showthread.php?862327-Any-way-to-know-from-where-my-page-was-called&goto=newpost
Tue, 08 May 2018 14:56:27 GMTI have a asp.net page I am working with and I would like to be able to tell from where the page was loaded if possible. I thought maybe sender in the page load event would give me that info but it just gives me the current page rather than the page that called it.

In this case I have a page that can normally be called one of three ways.
1: The user completes a Paypal transaction
2: The user chooses to pay later
3: The user enters the address [and any other info required] in the address bar

In the case of 3 the page would redirect them most of the time due to certain variables not being set but there is a point where they could enter the direct address and trigger the page.

The main thing I need to be able to know is was the page called from PayPal or was it called from another method.

I do not do much ASP coding and this is my first time working with Paypal so I am hoping there is a simple solution that i am just not seeing.

Any help would be appreciated.
]]>ASP.NET And ASP.NET CoreDataMiserhttp://www.vbforums.com/showthread.php?862327-Any-way-to-know-from-where-my-page-was-calledDo people use the NuGet SlickGrid JavaScript library?http://www.vbforums.com/showthread.php?862213-Do-people-use-the-NuGet-SlickGrid-JavaScript-library&goto=newpost
Sat, 05 May 2018 16:26:29 GMTI'm curious how many people use the NuGet SlickGrid JavaScript library?
]]>ASP.NET And ASP.NET Coreszlamanyhttp://www.vbforums.com/showthread.php?862213-Do-people-use-the-NuGet-SlickGrid-JavaScript-libraryVS 2008 Having issues with querystring when submitting datahttp://www.vbforums.com/showthread.php?862149-Having-issues-with-querystring-when-submitting-data&goto=newpost
Thu, 03 May 2018 13:28:48 GMT "" Then
Else
Child = 1
AddParentToDB()
End If
ElseIf Request.QueryString("mode") = "Child" Then
Child = Val(Request.QueryString("Child"))
Children = Request.QueryString("of")
txtParentID.Text = Request.QueryString("ParentID")
End If
txtChildID.Text = Children
End Sub
---------
Code:
---------
Protected Sub btnNext_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnNext.Click
lblMessage.Visible = False
If ValidateChild() Then
AddChildToDB()
Children = txtChildID.Text
If Val(Child) < Val(Children) Then
Server.Transfer("reg2.aspx?mode=Child&Child=" & (Child + 1).ToString & "&of=" & Children & "&ParentID=" & txtParentID.Text, True)
Else
Server.Transfer("regconfirmation.aspx?Mode=Confirm&Children=" & Children & "&ParentID=" & txtParentID.Text, True)
End If
End If
End Sub
---------
]]>Below are two routines from a aspx page.
The first time this page is called it is passed a mode=Parent and that seems to work fine
The intention is that when the Next button is clicked it will either recall itself with a mode of child or call the confirm page.

What I am seeing is that after hitting next the page reloads with the mode=parent before the break point in the next routine is hit. When it gets to the next button routine it does not have the value for children and is being prevented from adding the next child.

On a previous form the user would enter a number of children to enter. If that number is greater than 1 then the child form should run as many times as needed but for some reason It is loosing that child value and the page load routine never gets the mode=child.

I have placed the children value in a text box as a test and can see that it is there and valid but when the next button code executes the var is empty.

Any ideas why this is happening or what I need to change to prevent it.

If dt.Rows.Count > 0 Then
dt.Rows.RemoveAt(RowToDelete)
dt.AcceptChanges()
GridView1.DataSource = dt
End If
GridView1.DataBind()
End Sub

Protected Sub OnRowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
Dim item As String = e.Row.Cells(0).Text
For Each button As Button In e.Row.Cells(2).Controls.OfType(Of Button)()
If button.CommandName = "Delete" Then
button.Attributes("onclick") = "if(!confirm('Do you want to delete " + item + "?')){ return false; };"
End If
Next
End If
End Sub