|
Or...
you can configure the PostBackUrl property of a ASP.NET Link Button. Then, within the other page code, you can access Page.PreviousPage. It'll give you access to the members of the previous page (the one that contains the link button), like the selected Item you want. I think this aproach is even better because it keeps your URL clean.
:]
|
|
|
|
|
hi... thank you so much. I really appreciate if you can show me some code for this. Thanks in advance.
|
|
|
|
|
try this:
On page1 u send it as:
Response.Redirect("frmUserMaster.aspx?id=" & cmbName.Items(cmbName.SelectedIndex).Value)
on 2nd page u can get this value as:
NameID = Request.Params("id")
Hope this helps u..
|
|
|
|
|
But it depends on the version .i.e Available in ASP.NET 2.0 only
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
Hello there,i just want to know that it is possible in the website that a asp.net pages and Master pages could be together in a website??for example,the default page would have been the aspnet.aspx..and one of the links/navigation in my aspnet.aspx is the master page i created..
Ive done it lately but it couldnt work,that my deefault page has a link to the master page..could anyone tell me how to make a masterpage become a link in default website page?
thanks 4 helping...
|
|
|
|
|
Hello,
I have a generic list named Rows:
Dim a As New Generic.List(Of Row)
Row is a structure which has 2 properties: Name and Content.
Is it possible, without a for loop, to find a Row in Rows which Name
is "Home" and get its content?
Thanks,
Miguel
|
|
|
|
|
Hi everybody...
Does anybody know if it`s possible do register some javascript code in a control`s parent page, especially inside a head tag? These javascripts need to access and interact with some Html Controls inside the control. Is it possible? I don`t want to post back my page so I do prefer to interact with users just using DHTML and Javascript.
Thanks in advance...
Cheers!!! XD
|
|
|
|
|
Register the javascript file name in the Parent aspx page like
And Register the Event and function in load page in the control ascx.cs page
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
asp.net is giving an error in the Script manager tag that its is not an element of asp any suggestions
|
|
|
|
|
you have to install ajax extensions [http://ajax.asp.net/[^] and then add system.web.extensions as references in your project...
-----
|
|
|
|
|
Hello fools.
Dim NewListBidAmount As Double = PostBidAmountTextBox.Text
I have the following code taking a value from a text box and using it else where. The value is a monetary value and therefore should only have two places after the decimal point. If I type in more than two places though the addtional places are stll shown when displayed and used elsewhere. How can I eradicate any digits that occur after the first two places after the .?
Thanks
|
|
|
|
|
use formatcurrency(amount,2) before displaying it ..
-----
|
|
|
|
|
I had a project where I needed to restrict decimal point places also. I wrote this method:
Public Sub RestrictDecimalPlaces(ByVal txtSender As TextBox, ByVal intPlacesToTheRight As Integer)
'***********************************************************************************
' This function will ensure that only one decimal point is allowed in a text box
' and that the user may only type in a certain number of digits to the right of
' the decimal point (as specified by the intPlacesToTheRight parm).
'***********************************************************************************
If txtSender.TextLength <> 0 Then
Dim strTemp As String = txtSender.Text
Dim straTemp() As String
straTemp = strTemp.Split(".")
Select Case straTemp.Length
Case 1
'No decimal point, so no problem
Return
Case 2
'One decimal point, ensure specified chars to the right
Select Case straTemp(1).Length
Case Is > intPlacesToTheRight
txtSender.Text = straTemp(0) & "." & straTemp(1).PadRight(intPlacesToTheRight, "0").Substring(0, intPlacesToTheRight)
txtSender.SelectionStart = txtSender.Text.Length
End Select
Case Else
'More than one decimal point, remove extra
txtSender.Text = straTemp(0) & "." & straTemp(1)
txtSender.SelectionStart = txtSender.Text.Length
End Select
End If
End Sub
And used it in the KeyPress Event of textboxes I wanted to restrict, like this:
Private Sub txtInput_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtInput.KeyUp
RestrictDecimalPlaces(sender, 4)
End Sub
However, I know this code still has some quirks...and it won't help when the user does a copy and paste into the textbox, so you will want to modify it or use other edits as well. Hope this helps.
|
|
|
|
|
|
|
Hi,
i would really need to know how could a javascript method call another method written in a c# script at the same client ofcourse!!
or if any one could help me in a highlighting function in javascript?
your responces are highly appreciated..
Thanx
|
|
|
|
|
you cannot call a server function from client without postback.
I don't what you want to do. to highlight a row you have to add onclick attribute to the row on rowdatabound and in that function (javascript) you can do row.style.backgroundColor = 'blue'
-----
|
|
|
|
|
To talk between the client and server, you'd have to psotback, or use AJAX....
There's no way to simply "call" a server side funciton from the client
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Thanks all for replies
my question is if i can call a c# script method from the javascript on the client, NOT a server method..
its bcus i wrote my code in c# script and i found out that the java script is going to deal with it too, i don't know if there's some way but i could'nt found any yet!!
thanks all again..
|
|
|
|
|
Right then - think you're labouring under a misapprehension here - your c# code IS NOT RUNNING ON THE CLIENT - it's on the server - the fact that it's in the same page as the markup and the js is immeterial - look for the runat=server / <% %> indicators = both mean the code is ACTUALLY executing on the server.
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
I'm working with Visual Studio Express 2005 and ASP.NET.
I want to handle mousevent (like mouse move) over a panel or image object, is it possible? I'm referring to Web not to Window.Form (c# for window),
Any example?
|
|
|
|
|
add attribute to the panel (panel1.attributes.add("onmousemove","javascript:onMouseMoveEvent();")
now you have to create onMouseMoveEvent in javascript and do whatever you want to do as per your login in this fucntion.
-----
|
|
|
|
|
but how can interact from javascript to ASP.NET? For example if i want draw a selection rectangle over a panel i've to handle mousemove from javascript, but i need coordinate referred to the panel position, then handle the drawing above the pannel from onPainEvent, how?
|
|
|
|
|
the coordinates you can get by event.clientX and event.clientY or event.x, event.y, but can you please describe what you are trying to do?
You may look at the following [http://w3schools.com/js/js_examples_3.asp[^] for event object in javascript..
-----
|
|
|
|
|
think having an image on the webpage, i can click over a point of it then drag the mouse to get a selection box, i want do make that
-- modified at 19:48 Monday 12th March, 2007
|
|
|
|