Click here to Skip to main content
15,896,207 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Setting ACE is very slow for folder with many files and subfolders. Pin
Manfred Rudolf Bihy1-Sep-13 7:39
professionalManfred Rudolf Bihy1-Sep-13 7:39 
QuestionRegarding input controls to use on Forums Pin
Karteek Panakani28-Aug-13 22:32
Karteek Panakani28-Aug-13 22:32 
AnswerRe: Regarding input controls to use on Forums Pin
Richard Deeming29-Aug-13 2:30
mveRichard Deeming29-Aug-13 2:30 
AnswerRe: Regarding input controls to use on Forums Pin
Forbiddenx30-Aug-13 3:49
Forbiddenx30-Aug-13 3:49 
Questionset inputfield value using java in ASP.net Pin
happysoul28-Aug-13 21:45
happysoul28-Aug-13 21:45 
SuggestionRe: set inputfield value using java in ASP.net Pin
Richard Deeming29-Aug-13 2:27
mveRichard Deeming29-Aug-13 2:27 
GeneralRe: set inputfield value using java in ASP.net Pin
happysoul29-Aug-13 2:51
happysoul29-Aug-13 2:51 
GeneralRe: set inputfield value using java in ASP.net Pin
Richard Deeming29-Aug-13 2:56
mveRichard Deeming29-Aug-13 2:56 
OK, the obvious problem is that you're using the same key for both scripts:
happysoul wrote:
If (Not Source.ClientScript.IsStartupScriptRegistered("clientScript")) Then
   Source.ClientScript.RegisterStartupScript(Source.GetType(), "clientScript", strscript)
End If

As a result, only the first script will be registered.

Try specifying a different key for each script:
VB
Public Sub RunJS(ByVal Source As Page, ByVal Script As String, ByVal Key As String)
    Dim strscript As String = Script
    If (Not Source.ClientScript.IsStartupScriptRegistered(Key)) Then
        Source.ClientScript.RegisterStartupScript(Source.GetType(), Key, strscript)
    End If
End Sub
 
Protected Sub Button15_Click(sender As Object, e As EventArgs) Handles Button15.Click
    Dim JavaString As String
    JavaString = "<script type=""text/javascript""> var elem = document.getElementById(""Text2"");elem.value = ""Boe"";</script>"
    JavaString = JavaString.Replace("Boe", PMDate.Text)
    RunJS(Me.Page, JavaString, "clientScriptText2")
 
    JavaString = "<script type=""text/javascript""> var elem = document.getElementById(""Text1"");elem.value = ""Boe"";</script>"
    JavaString = JavaString.Replace("Boe", CmDate.Text)
    RunJS(Me.Page, JavaString, "clientScriptText1")
End Sub




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: set inputfield value using java in ASP.net Pin
happysoul29-Aug-13 3:34
happysoul29-Aug-13 3:34 
QuestionAjax Form URL from List<ViewModel> Pin
eddieangel28-Aug-13 7:16
eddieangel28-Aug-13 7:16 
QuestionDesign Ideas - List Of Custom controls. Pin
Forbiddenx28-Aug-13 5:57
Forbiddenx28-Aug-13 5:57 
GeneralRe: Design Ideas - List Of Custom controls. Pin
AmitGajjar2-Sep-13 21:05
professionalAmitGajjar2-Sep-13 21:05 
Questionbasic questions about viewstate Pin
ThetaClear26-Aug-13 22:16
ThetaClear26-Aug-13 22:16 
AnswerRe: basic questions about viewstate Pin
Keith Barrow28-Aug-13 6:21
professionalKeith Barrow28-Aug-13 6:21 
GeneralRe: basic questions about viewstate Pin
ThetaClear28-Aug-13 7:02
ThetaClear28-Aug-13 7:02 
QuestionHow to insert Header Rows into Gridview with custom method? Pin
arcadeRob26-Aug-13 6:57
arcadeRob26-Aug-13 6:57 
QuestionMenu Navigation Pin
Codes DeCodes26-Aug-13 0:37
Codes DeCodes26-Aug-13 0:37 
AnswerRe: Menu Navigation Pin
Paramu197326-Aug-13 4:10
Paramu197326-Aug-13 4:10 
GeneralRe: Menu Navigation Pin
Codes DeCodes26-Aug-13 18:48
Codes DeCodes26-Aug-13 18:48 
AnswerRe: Menu Navigation Pin
Priyanka Bhagwat28-Aug-13 21:33
professionalPriyanka Bhagwat28-Aug-13 21:33 
GeneralRe: Menu Navigation Pin
Codes DeCodes30-Aug-13 0:45
Codes DeCodes30-Aug-13 0:45 
QuestionUpdatePanel Image -Update Pin
Paramu197325-Aug-13 21:53
Paramu197325-Aug-13 21:53 
AnswerRe: UpdatePanel Image -Update Pin
jkirkerx26-Aug-13 6:52
professionaljkirkerx26-Aug-13 6:52 
QuestionDotnetnuke bootstrap Pin
sarang_k25-Aug-13 2:18
sarang_k25-Aug-13 2:18 
Questionhow to run java command on web server Pin
ianoseb24-Aug-13 23:12
ianoseb24-Aug-13 23: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.