Click here to Skip to main content
16,006,362 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerCP IGNORE: homework Pin
leckey4-Nov-08 14:35
leckey4-Nov-08 14:35 
AnswerRe: University Information System/Univerity Managemeny System Pin
Ashfield4-Nov-08 21:24
Ashfield4-Nov-08 21:24 
QuestionHow do I do partial update in multiple updatepanels with timer Pin
kmuthuk4-Nov-08 10:33
kmuthuk4-Nov-08 10:33 
AnswerRe: How do I do partial update in multiple updatepanels with timer Pin
Venkatesh Mookkan4-Nov-08 15:14
Venkatesh Mookkan4-Nov-08 15:14 
Questionown email sending Pin
razikang4-Nov-08 10:21
razikang4-Nov-08 10:21 
AnswerCP Ignore - spamming the site Pin
Dave Kreskowiak4-Nov-08 10:37
mveDave Kreskowiak4-Nov-08 10:37 
AnswerREPORTED AS ABUSE Pin
leckey4-Nov-08 14:28
leckey4-Nov-08 14:28 
QuestionGeneral Question About Popup Pin
Davidv1234-Nov-08 6:48
Davidv1234-Nov-08 6:48 
Hello all,

Long time reader, and first time to post a question.

I am making a multi page website and one of the pages i have a linkbutton's linked to images and when clicked to open a specific page.

My Question is:

Can I create function(s) that i can call from anywhere to generate a popupscript and pass in page name,params etc, or am i forced to use ClientScript.RegisterStartupScript(this.getType,"....","MyNewScript") on each and every call i make to it?

I tried creating a new aspx page with codebehind and adding a function to create the popup, but can't use the class either by typing it or with a using statement.

Example(for clarification)
----------------------------------------------
Products.aspx

protected void MachinePictureAndTitle_ItemCommand(object source, DataListCommandEventArgs e)
{
ImageButton myLinkButton = new ImageButton();
myLinkButton = (ImageButton)e.Item.FindControl("MachineImage");
//Append the idvalue to the query string for the popupwindow and call the new window

//Can Either Code it here and not be reusable
ClientScript.RegisterStartupScript(this.GetType, "xx", "script language='javascript'>window.open('PopUpInfo.aspx?IdValue=" + myLinkButton.CommandArgument + "')</script>", "NewPopUp");


}

//want to code like this and put in other page so can be usable and be referenceable from one location.

private void CreatePopUp(string PageName,string Title)
{

ClientScript.RegisterStartupScript(this.GetType,"<script language='javascript'>window.open(" + PageName+")</script>",Title);

}
private void CreatePopUp(string PageName, string Title, string ParameterName,string Parameter)
{

ClientScript.RegisterStartupScript(this.GetType,"<script language='javascript'>window.open(" + PageName+ParameterName=Parameter+")</script>",Title);

}


Thanks for Reading and hopefully someone understands this Cool | :cool:

David From NYC
QuestionExtraction of datas Pin
John.L.Ponratnam4-Nov-08 4:30
John.L.Ponratnam4-Nov-08 4:30 
AnswerRe: Extraction of datas Pin
Prasanna Kumar Pete4-Nov-08 16:18
Prasanna Kumar Pete4-Nov-08 16:18 
GeneralRe: Extraction of datas Pin
John.L.Ponratnam9-Nov-08 17:20
John.L.Ponratnam9-Nov-08 17:20 
QuestionHow to add New Row to a datagrid ? [modified] Pin
Prasadsm4-Nov-08 2:35
Prasadsm4-Nov-08 2:35 
QuestionHelp needs in Logging In Pin
Senthil S4-Nov-08 1:53
Senthil S4-Nov-08 1:53 
AnswerRe: Help needs in Logging In Pin
cyber-drugs4-Nov-08 2:14
cyber-drugs4-Nov-08 2:14 
GeneralRe: Help needs in Logging In Pin
Senthil S4-Nov-08 2:19
Senthil S4-Nov-08 2:19 
AnswerRe: Help needs in Logging In Pin
saanj4-Nov-08 6:03
saanj4-Nov-08 6:03 
AnswerRe: Help needs in Logging In Pin
D4ever6-Nov-08 8:17
D4ever6-Nov-08 8:17 
QuestionUsers Bypass the Login Screen Pin
Vimalsoft(Pty) Ltd4-Nov-08 1:26
professionalVimalsoft(Pty) Ltd4-Nov-08 1:26 
AnswerRe: Users Bypass the Login Screen Pin
Brij4-Nov-08 2:47
mentorBrij4-Nov-08 2:47 
GeneralRe: Users Bypass the Login Screen Pin
Vimalsoft(Pty) Ltd4-Nov-08 2:54
professionalVimalsoft(Pty) Ltd4-Nov-08 2:54 
AnswerRe: Users Bypass the Login Screen Pin
Brij4-Nov-08 3:02
mentorBrij4-Nov-08 3:02 
GeneralRe: Users Bypass the Login Screen Pin
Vimalsoft(Pty) Ltd5-Nov-08 0:43
professionalVimalsoft(Pty) Ltd5-Nov-08 0:43 
QuestionSql Database Pin
shanthi jothi4-Nov-08 0:37
shanthi jothi4-Nov-08 0:37 
AnswerRe: Sql Database Pin
Vimalsoft(Pty) Ltd4-Nov-08 0:55
professionalVimalsoft(Pty) Ltd4-Nov-08 0:55 
AnswerRe: Sql Database Pin
J a a n s4-Nov-08 1:12
professionalJ a a n s4-Nov-08 1:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.