Showing posts with label browser. Show all posts
Showing posts with label browser. Show all posts

Thursday, March 29, 2012

pop ups

Is there any way to programmatically open pop ups with SP2? My ASP.NET site
uses JavaScript to open new browser windows and they are being shut down
automatically...Pop up blockers don't block windows that are opened by the same domain as
the page that is loaded.

"mareal" <m@.m.com> wrote in message
news:2E000184-7628-4DA2-9906-0ECCE1C93C75@.microsoft.com...
> Is there any way to programmatically open pop ups with SP2? My ASP.NET
> site
> uses JavaScript to open new browser windows and they are being shut down
> automatically...
Thank you Scott. I am not sure I am following. My browser even blocks
Microsoft pop ups from this forum unless I allow them.

I was hoping to find some kind of command to allow my site to open new
browser windows (overwriting pop ups directives)

"Scott M." wrote:

> Pop up blockers don't block windows that are opened by the same domain as
> the page that is loaded.
> "mareal" <m@.m.com> wrote in message
> news:2E000184-7628-4DA2-9906-0ECCE1C93C75@.microsoft.com...
> > Is there any way to programmatically open pop ups with SP2? My ASP.NET
> > site
> > uses JavaScript to open new browser windows and they are being shut down
> > automatically...
>
The pop ups you get from various web sites (including MS) don't actually
have content that comes from the domain you are visiting. Most companies
have special servers dedicated to just serving up the advertising content
(ad servers). For example, the content of a popup ad that you got while
visiting cnn.com might actually be coming from http://ads.cnn.com and the
content of the popup windows you get while visiting Microsoft's web site
might actually be coming from http://ads.microsoft.com.

When you build a web page that includes the window.open() client-side
scripting command that doesn't mean that a popup blocker will prevent that
window from opening. Most popup blockers look to see where the content of
that new window is coming from. If it is from the same domain as the page
that launched it, the popup will be allowed, if not it won't.

For example, visit this page that I built and run for my son's cub scout
pack (http://pack96.org/Calendar/PackCalendar.aspx) and click on one of the
links. You will see that the popup windows do not get blocked even though
your popup blocker is on.

-Scott

"mareal" <m@.m.com> wrote in message
news:DD978129-4376-435E-8F35-C4F80209AD1F@.microsoft.com...
> Thank you Scott. I am not sure I am following. My browser even blocks
> Microsoft pop ups from this forum unless I allow them.
> I was hoping to find some kind of command to allow my site to open new
> browser windows (overwriting pop ups directives)
> "Scott M." wrote:
>> Pop up blockers don't block windows that are opened by the same domain as
>> the page that is loaded.
>>
>> "mareal" <m@.m.com> wrote in message
>> news:2E000184-7628-4DA2-9906-0ECCE1C93C75@.microsoft.com...
>> > Is there any way to programmatically open pop ups with SP2? My ASP.NET
>> > site
>> > uses JavaScript to open new browser windows and they are being shut
>> > down
>> > automatically...
>>
>>
>

pop ups

Is there any way to programmatically open pop ups with SP2? My ASP.NET site
uses JavaScript to open new browser windows and they are being shut down
automatically...Pop up blockers don't block windows that are opened by the same domain as
the page that is loaded.
"mareal" <m@.m.com> wrote in message
news:2E000184-7628-4DA2-9906-0ECCE1C93C75@.microsoft.com...
> Is there any way to programmatically open pop ups with SP2? My ASP.NET
> site
> uses JavaScript to open new browser windows and they are being shut down
> automatically...
Thank you Scott. I am not sure I am following. My browser even blocks
Microsoft pop ups from this forum unless I allow them.
I was hoping to find some kind of command to allow my site to open new
browser windows (overwriting pop ups directives)
"Scott M." wrote:

> Pop up blockers don't block windows that are opened by the same domain as
> the page that is loaded.
> "mareal" <m@.m.com> wrote in message
> news:2E000184-7628-4DA2-9906-0ECCE1C93C75@.microsoft.com...
>
>
The pop ups you get from various web sites (including MS) don't actually
have content that comes from the domain you are visiting. Most companies
have special servers dedicated to just serving up the advertising content
(ad servers). For example, the content of a popup ad that you got while
visiting cnn.com might actually be coming from http://ads.cnn.com and the
content of the popup windows you get while visiting Microsoft's web site
might actually be coming from http://ads.microsoft.com.
When you build a web page that includes the window.open() client-side
scripting command that doesn't mean that a popup blocker will prevent that
window from opening. Most popup blockers look to see where the content of
that new window is coming from. If it is from the same domain as the page
that launched it, the popup will be allowed, if not it won't.
For example, visit this page that I built and run for my son's cub scout
pack (http://pack96.org/Calendar/PackCalendar.aspx) and click on one of the
links. You will see that the popup windows do not get blocked even though
your popup blocker is on.
-Scott
"mareal" <m@.m.com> wrote in message
news:DD978129-4376-435E-8F35-C4F80209AD1F@.microsoft.com...
> Thank you Scott. I am not sure I am following. My browser even blocks
> Microsoft pop ups from this forum unless I allow them.
> I was hoping to find some kind of command to allow my site to open new
> browser windows (overwriting pop ups directives)
> "Scott M." wrote:
>

Saturday, March 24, 2012

populate my datagrid RESOLVED

im trying to fill my datagrid but when the page loads in the browser you cant even see it.
wots going on there then here is the code,

Imports System
Imports System.data
Imports System.Data.SqlClient

Public Class WebForm1
Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

End Sub
Protected WithEvents txt_mobile_number As System.Web.UI.WebControls.TextBox
Protected WithEvents txt_name As System.Web.UI.WebControls.TextBox
Protected WithEvents btn_submit As System.Web.UI.WebControls.Button
Protected WithEvents DataGrid1 As System.Web.UI.WebControls.DataGrid

'NOTE: The following placeholder declaration is required by the Web Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region

' declare the data set and data adapters
Private dsUsers As New DataSet
Private daUsers As New SqlDataAdapter



Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load



End Sub

Private Sub loadusers()
'connect to database

Dim oSQLConn As SqlConnection = New SqlConnection
oSQLConn.ConnectionString = "Data Source=(local);" & _
"Initial Catalog=Con_Test;" & _
"Integrated Security=SSPI"
oSQLConn.Open()

'databind the infromation

'If SqlConnection1.State = ConnectionState.Closed Then SqlConnection1.Open()
daUsers.SelectCommand = New SqlCommand("SELECT * from table_user", oSQLConn)
daUsers.Fill(dsUsers, "Mobile")
DataGrid1.DataSource = dsUsers.Tables(0)
DataGrid1.DataBind()
oSQLConn.Close()
'daUsers.Fill(dsUsers)
'DataGrid1.DataSource = dsUsers.Tables(0)

End Sub


End ClassDoes your dataset contain any data ?
If there is no row in the DataTable, you will not see the Datagrid on the page.
im trying to fill my datagrid but when the page loads in the browser you cant even see it.

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load



End Sub

What else do you expect with an empty Page_Load event :p
ii called loadusers now in the page load an now i am gettin an error that
'invalid object name table_user', thats the table name within Con_test.
:eek2:
Has it been spelt right in the database?
top man mendhank, i know it seemed obvious with the error message but i never would have checked it,
u da man
Not a problem, we all learn... :)

Wednesday, March 21, 2012

populating & Submitting an external form

Hey All,

In windows forms this can be done using the microsoft web browser control, but how is it done in asp.net either using the axwebbrowser control or httpwebrequest methods

this is an example description only actul sites and stuff will be different

I want my web site to do a search on google so on my site the user enters the input value into a text box, and they press send data.
This is then passed to google via some kind of magic, (ie webrequest) and we populate the google input box and press the search button, when we get our results back from google, i run the response via my regular expression and display the results in my own format.

I dont actully want to spider googles results its just the method is the closest description i can give to what i want to do.

I have been looking at posting data with the httpwebrequest and response methods but im not sure on it.

Can someone advise of the best possible method to handle such events

regards

Carlbump
Try the Google Web Services, even the free subscription allows you loads of searches.
You just make your own pages but use Google to do the searches, very straightforward.
i did say that i only was using google as an example