Craigpt
Posts
-
Window.Opener equivalent -
Window.Opener equivalentGuffa wrote:
The browser doesn't tell the server where the page will be displayed, so the server simply doesn't know.
Ok thanks, that's what i needed to know. I remembered the popup window already had querystrings in the URL so i just used the presence of those to decide.
-
Using Using object disposal...No problem! Happy coding!:laugh:
-
Using Using object disposal...as far as i can tell, and my coworker agrees, it should work great
-
Using Using object disposal...the "using" scope automatically calls the dispose method (if available) upon leaving, whether through normal means or if it errors
-
Window.Opener equivalentHi All, I have a page that is used in two separate scenarios, either directly linked in the web application, or as a popup using window.open. On this page is a datagrid with three columns i care about, column1 is just some information (a KeyWord) and defaulted to visible=false for when the page is used as a popup, column2 is the same information but used as a link when the window is a popup, and column3 is a select command item also default to visible=false. basically, i want it so that when used as a popup: column1 = visible false column2 = visible true column3 = visible false when linked in the main window: column1 = visible true column2 = visible false column3 = visible true (the exact opposite) I want to be able to check onload the page's status, and change the visibilities accordingly. Changing the visibility is easy enough, but i can't find a way to check whether or not this page is a popup (window.opener != null) or not (window.opener == null) using server side code. Any help would be appreciated
-
PDF UploadProbably best thing to do would be to e-mail the author of that article. S/He'd probably be the best to come up with an answer for that, and they can update their article to include that relevant information.
-
Datagrid losing source between postbacksI have a datagrid, that gets setup with this function: Private Function SetupExamGrid() As DataTable If Not dgExam.DataSource Is Nothing Then DVTemp = dgExam.DataSource Else DTTemp = New DataTable DTTemp.Columns.Add(New DataColumn("exam", GetType(String))) DTTemp.Columns.Add(New DataColumn("crse_cd", GetType(String))) DTTemp.Columns.Add(New DataColumn("exam_ty", GetType(String))) DVTemp = New DataView(DTTemp) End If dgExam.DataSource = DVTemp dgExam.DataBind() End Function DVTemp is a dataview, created using DTtemp, which is a datatable. Both DVTemp and DTTemp are stored class-scope. I have enableViewState = True on the datagrid, but for some reason i'm losing the value stored in both DVTemp and DTTemp between postbacks. When i break it in the page.load sub, both variables are set to nothing, even though there was actual info in the source. Any ideas?
-
Opening blank .ASPX fileBasically what i'm trying to do, is create a user control of a DateTimePicker for asp.net. It's easy enough to create a user control of the linked image, or button, and just have it accept the controlName as a parameter, and then call an aspx page that includes the calendar and such. Unfortunately, i'm lazy, and thus don't want to have to include both a user control AND an aspx page into my project. So i figured i'd try to create the calendar page on the fly in a JS function in the user control itself.
-
Opening blank .ASPX fileA NEW html file can easily be opened by creating a javascript function with: " function Name { contents = "This is my page" contents += "I like it a lot" Win1=window.open('', 'Window1', 'resizable, height=200, width=200'); Win1.document.writeln(contents); } My problem, is that the "window.open" (as far as i know) only opens html pages. I've tried putting into the "conents" variable all necessary SCRIPT from my aspx page i wish to create on the fly, but the problems i'm encountering are: 1) The new page does not recognize any tags 2) There is no code behind the file I've tried putting the class definitions that would normally be behind the .aspx file inside script tags for the main page itself, but that seems to have no effect (not even errors showing up) Is it possible to open a .ASPX page on the fly? If so, how?