|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
No Response Redirect but something like Response Forward?This is probably a very simple issue but I cannot find the answer
googling at the moment. I got this function in a ASP-page VB code Private Sub GoToTheOtherWebSite() Dim InternetAdresPR As String InternetAdresPR = AppSettings.TheOtherWebSite Response.Redirect(InternetAdresPR) End Sub Now instead of redirecting to the other website, I want to open a new browser window with the other website. In HTML I know what to do, but is there some ASP-VB function to do it from the code, since in HTML I cannot ask the AppSettings value I think. Server side you have no concept of a "new window". You could read this
settings server side and create the "client code" that will do that (could be as simple as an hyperlink whose href attribute is initialized from a server side value). -- Show quoteHide quotePatrice <marcwent***@hotmail.com> a écrit dans le message de news: 1164988433.117034.149***@16g2000cwy.googlegroups.com... > This is probably a very simple issue but I cannot find the answer > googling at the moment. > > I got this function in a ASP-page VB code > > > Private Sub GoToTheOtherWebSite() > Dim InternetAdresPR As String > InternetAdresPR = AppSettings.TheOtherWebSite > Response.Redirect(InternetAdresPR) > End Sub > > Now instead of redirecting to the other website, I want to open a new > browser window with the other website. In HTML I know what to do, but > is there some ASP-VB function to do it from the code, since in HTML I > cannot ask the AppSettings value I think. > This works for popups, watcth the word wrap on the code.
Private Sub popUp(ByVal strURL As String) Dim strScript As String = "<Script Language='javascript'>" & _ "window.open('" & strURL & "', 'popup', 'toolbar=no, scrollbars=no, titlebar=no, width=425, height=225');" & _ "</scr" & "ipt>" RegisterClientScriptBlock("Script", strScript) End Sub Patrice wrote: Show quoteHide quote > Server side you have no concept of a "new window". You could read this > settings server side and create the "client code" that will do that (could > be as simple as an hyperlink whose href attribute is initialized from a > server side value). > > -- > Patrice > > <marcwent***@hotmail.com> a écrit dans le message de news: > 1164988433.117034.149***@16g2000cwy.googlegroups.com... > > This is probably a very simple issue but I cannot find the answer > > googling at the moment. > > > > I got this function in a ASP-page VB code > > > > > > Private Sub GoToTheOtherWebSite() > > Dim InternetAdresPR As String > > InternetAdresPR = AppSettings.TheOtherWebSite > > Response.Redirect(InternetAdresPR) > > End Sub > > > > Now instead of redirecting to the other website, I want to open a new > > browser window with the other website. In HTML I know what to do, but > > is there some ASP-VB function to do it from the code, since in HTML I > > cannot ask the AppSettings value I think. > > Charlie Brown schreef:
> This works for popups, watcth the word wrap on the code. Hey, this works. Can I set a login information cookie like this also,> > Private Sub popUp(ByVal strURL As String) > Dim strScript As String = "<Script Language='javascript'>" > & _ > "window.open('" & strURL & "', 'popup', 'toolbar=no, > scrollbars=no, titlebar=no, width=425, height=225');" & _ > "</scr" & "ipt>" > RegisterClientScriptBlock("Script", strScript) > End Sub or do I then have to go as far down as window socket programming? And if so, is there something like a win socket lib for Visual Basic? For the best the other website should use the same login information as the website jumping from. You can do anything standard javascript code can do, including cookies.
marcwent***@hotmail.com wrote: Show quoteHide quote > Charlie Brown schreef: > > > This works for popups, watcth the word wrap on the code. > > > > Private Sub popUp(ByVal strURL As String) > > Dim strScript As String = "<Script Language='javascript'>" > > & _ > > "window.open('" & strURL & "', 'popup', 'toolbar=no, > > scrollbars=no, titlebar=no, width=425, height=225');" & _ > > "</scr" & "ipt>" > > RegisterClientScriptBlock("Script", strScript) > > End Sub > > Hey, this works. Can I set a login information cookie like this also, > or do I then have to go as far down as window socket programming? And > if so, is there something like a win socket lib for Visual Basic? For > the best the other website should use the same login information as the > website jumping from. Charlie Brown schreef:
> You can do anything standard javascript code can do, including cookies. Thanks! I once had a project were I used a C win socket library toinclude a scanned picture into a html message. In that case there probably were some options we had to set which were low level. But if a few cookies can be done with standard javascript then that's a reassurance. Although that win socket project learned me a lot about how HTTP works, and was fun in the end when it finallly worked, constructing a HTTP message from scratch is real error prone, one space too many at the wrong place and .... failure. Thanks again for all suggestions, Marc Wentink
Offline application for reporting and collect data
Email Socket Question Fastest String search Report Viewer Asynchronous thread abort error Find Window Question Disable sort on specific columns with VB.NET datagrid What does this mean? Access and SQL server update Is user admin? component to show info |
|||||||||||||||||||||||