Click here to Skip to main content
15,913,486 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Static method Pin
N a v a n e e t h27-Jan-08 15:57
N a v a n e e t h27-Jan-08 15:57 
GeneralRe: Static method Pin
Sandeep Akhare28-Jan-08 2:27
Sandeep Akhare28-Jan-08 2:27 
GeneralRe: Static method Pin
N a v a n e e t h28-Jan-08 2:45
N a v a n e e t h28-Jan-08 2:45 
JokeRe: Static method Pin
Sandeep Akhare28-Jan-08 3:22
Sandeep Akhare28-Jan-08 3:22 
Questionany way to export gridview to pdf? Pin
sepel27-Jan-08 2:32
sepel27-Jan-08 2:32 
AnswerRe: any way to export gridview to pdf? Pin
pmarfleet27-Jan-08 5:42
pmarfleet27-Jan-08 5:42 
AnswerRe: any way to export gridview to pdf? Pin
Vasudevan Deepak Kumar27-Jan-08 17:57
Vasudevan Deepak Kumar27-Jan-08 17:57 
Questionhow to detect session in javascript? Pin
hardyyanto27-Jan-08 2:19
hardyyanto27-Jan-08 2:19 
hello every one...

i can use label and textbox in javascript, and now, i am using session, but can not detect in javascript.

my javascript:


function DisplayConfirmation(cost,textboxid)
{
var s=document.getElementById(textboxid).value;

if(s>cost)
{
if(confirm('Are u sure'))
{
document.getElementById('<%=HiddenField1.ClientID%>').value = "true"
}
else
{
document.getElementById("<%=HiddenField1.ClientID%>").value = 'false'
}

}
else

{

}
}




my code in vb:

Protected Sub FormView2_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles FormView2.DataBound

If Page.IsPostBack = True Then
Dim t2 As TextBox = TryCast(FormView2.FindControl("tes"), TextBox)
Dim l1 As Label = TryCast(FormView2.FindControl("costLabel"), Label)
Dim b As Button = TryCast(Me.FormView2.FindControl("button1"), Button)

b.Attributes.Add("onclick", "return DisplayConfirmation(" & l1.Text & ",'" & t2.ClientID & "')")
End If
End Sub

the label and textbox can detect in javascript...

but if i use session, it can not detect in javascript. i don't know about the true code...

my code use session like this:

Protected Sub FormView2_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles FormView2.DataBound

If Page.IsPostBack = True Then

Dim t2 As TextBox = TryCast(FormView2.FindControl("tes"), TextBox)
Dim l1 As Label = TryCast(FormView2.FindControl("costLabel"), Label)
Dim b As Button = TryCast(Me.FormView2.FindControl("button1"), Button)
Session("l") = l1

b.Attributes.Add("onclick", "return DisplayConfirmation(" & Session("l").tostring & ",'" & t2.ClientID & "')")

End If
End Sub

it can not detect...

what should i change it?

thx..
AnswerRe: how to detect session in javascript? Pin
pmarfleet27-Jan-08 5:40
pmarfleet27-Jan-08 5:40 
JokeRe: how to detect session in javascript? Pin
Vasudevan Deepak Kumar27-Jan-08 18:02
Vasudevan Deepak Kumar27-Jan-08 18:02 
AnswerRe: how to detect session in javascript? Pin
kuwl_mark27-Jan-08 22:17
kuwl_mark27-Jan-08 22:17 
QuestionHow can i iterate through and modify the data in databround rows of a 3.5 ListView similar to a Gridview Pin
vortex6930693027-Jan-08 0:28
vortex6930693027-Jan-08 0:28 
AnswerRe: How can i iterate through and modify the data in databround rows of a 3.5 ListView similar to a Gridview Pin
pmarfleet27-Jan-08 2:13
pmarfleet27-Jan-08 2:13 
GeneralRe: How can i iterate through and modify the data in databround rows of a 3.5 ListView similar to a Gridview Pin
vortex6930693027-Jan-08 7:44
vortex6930693027-Jan-08 7:44 
GeneralRe: How can i iterate through and modify the data in databround rows of a 3.5 ListView similar to a Gridview Pin
pmarfleet27-Jan-08 8:47
pmarfleet27-Jan-08 8:47 
GeneralDoubt about wesite accessing Pin
sjs4u26-Jan-08 23:10
sjs4u26-Jan-08 23:10 
GeneralRe: Doubt about wesite accessing Pin
pmarfleet27-Jan-08 2:09
pmarfleet27-Jan-08 2:09 
GeneralRe: Doubt about wesite accessing Pin
sjs4u27-Jan-08 4:38
sjs4u27-Jan-08 4:38 
GeneralRe: Doubt about wesite accessing Pin
pmarfleet27-Jan-08 5:38
pmarfleet27-Jan-08 5:38 
GeneralRe: Doubt about wesite accessing Pin
Vasudevan Deepak Kumar27-Jan-08 18:01
Vasudevan Deepak Kumar27-Jan-08 18:01 
GeneralRe: Doubt about wesite accessing Pin
Tad McClellan27-Jan-08 8:24
professionalTad McClellan27-Jan-08 8:24 
QuestionProblem adding additional nested gridviews to a form Pin
bamagrad26-Jan-08 4:27
bamagrad26-Jan-08 4:27 
Generalshowing some of whole data in a drop down list Pin
Member 471741225-Jan-08 21:54
Member 471741225-Jan-08 21:54 
GeneralRe: showing some of whole data in a drop down list Pin
pmarfleet25-Jan-08 22:05
pmarfleet25-Jan-08 22:05 
GeneralAutomatic alert to other users Pin
Vipin.d25-Jan-08 21:52
Vipin.d25-Jan-08 21:52 

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.