|
Hi,
I was trying to send a number from a HTML textbox to add a value to it at the Server, then return it to an ASP textbox.
But I don't know to to pass the value of the HTML textbox to the server.
The 2 Javascript functions are:
<script type="text/javascript">
//the first function to call the server
function GetNumber() {
UseCallBack();
}
// The function receive the adjusted value from the server and display it into the textbox1
function GetRandomNumberFromServer(arg, context) {
document.forms[0].TextBox1.value = arg;
}
</script>
Here are the server side code, written in the .vb file:
Dim _callbackResult As String = Nothing
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim cbReference As String = Page.ClientScript.GetCallbackEventReference(Me, _
"arg", "GetRandomNumberFromServer", "context")
Dim cbScript As String = "function UseCallBack(arg, context) {" & cbReference & "}"
Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "UseCallBack", cbScript, True)
End Sub
Public Function GetCallbackResult() As String Implements System.Web.UI.ICallbackEventHandler.GetCallbackResult
Return _callbackResult
End Function
Public Sub RaiseCallbackEvent(ByVal eventArgument As String) Implements System.Web.UI.ICallbackEventHandler.RaiseCallbackEvent
_callbackResult =
'equal the value from the HTML textbox + 5
End Sub
Does anyone know where I can add some code to ask to pass the value to the Server?
Thanks,
-- modified at 4:30 Tuesday 3rd October, 2006
|
|
|
|
|
Hi,
I get this error randomly, please explain possible reasons..
Owner: ASP.Default_aspx
Type: IBM.WMQ.MQException
Source: amqmdnet
Description: CompCode: 2, Reason: 2018
Exception: CompCode: 2, Reason: 2018
Thanks
Mohan
|
|
|
|
|
Hi Mohan,
Did you integrate .Net application/Servers with IBM websphere MQ (IBM MQSeries).
With Regards
Satips
|
|
|
|
|
Yep, that is done & the website runs fine except this error occasionally & this error occurs when the page is not accessed for a while. But it doesn't sound to be a timeout issue, I’ve checked this.
|
|
|
|
|
|
i need to make web parts for which i need codes,please suggest me a web site from where i can get the required codes . mine is an asp.net application with c# as codebehind developed in .NET 2003 (i.e .NET 1.1)
|
|
|
|
|
Don't repost the same question.
With Regards
Satips
|
|
|
|
|
i have visited the site which you have given against my previous question but that site is for .NET 2.0 my application is in .NET 1.1,hence i mentioned that my application is in .NET 1.1 and reposted the question.
thanks
|
|
|
|
|
I have worked it in 2.0 only. Not in 1.1.
With Regards
Satips
|
|
|
|
|
Hi,
I want to read the XML values from an web page. For example i want to read the XML values from the below web page and i want to use or print it in my page.
http://www.flashasp.net/forum/Default.aspx?g=rsstopic&pg=forum[^]
How to do this?? Can any one suggest me how to read this or print this on my page???
Know is Drop, Unknown is Ocean
|
|
|
|
|
Hi,
With the help of Ajax you can read the xml values from an web page.
Happy coding,
With Regards
Satips
|
|
|
|
|
Hi,
Thanks for you help. Shall you explain it more with an example? Because i dnt have idea about Ajax.
Thank you very much
Know is Drop, Unknown is Ocean
|
|
|
|
|
|
how to -Develop a webpart which will display all the sites and sub sites.
For each site, it should display the name of all the web parts contained in that site.
This webpart when placed in any site should behave the same.
If any webpart in the site is hidden, specify accordingly.
using asp.net and c# .My application is in 2003 .NET (i.e .NET 1.1and not in .NET 2.0)
|
|
|
|
|
How can I schedule an ASP script to run at a certain time each day?
Thanks!
|
|
|
|
|
|
Hi guys,
When submit button is clicked on a web page (asp) i dont want users to click any links or other buttons till the request is been processed(web page queries the back end).
Web page reloads the same page with results, till then i need all links & buttons to be disabled.
I tried this code..
document.getElementsByTagName("input").disabled = true;
when submit button pressed, it disables the button but prevents from navigating to other page. how to avoid this?
Can any one suggest me an idea.
Thank you.
Mohan
|
|
|
|
|
You could do what writely (and probably others) do, and grey out the entire page and place a "please wait - processing" message over the top.
You would have a layer appear over the whole page with a transparent fill colour.
This would prevent the user pressing any link as they would be pressing the layer instead. When processing is finished, simply remove the layer or navigate to another page.
ChrisB
|
|
|
|
|
Guys,
Figured out myself from google..
document.getElementsByTagName("input")[i].disabled = true; for button
document.getElementsByTagName("a")[i].disabled = true;
document.getElementsByTagName("a")[i].removeAttribute("href"); for links
document.formname.submit() will carry on the submit action
any way thanks.
mohan
|
|
|
|
|
Hello,
I need to place Javascript code inside an Asp:Panel so that the Google Adsense banner be placed inside the panel.
I know how to do something like this in a page:
' Add javascript file (Show_Ads.js) [Google AdSense]
If Not Page.ClientScript.IsClientScriptIncludeRegistered("AdSense") Then
Page.ClientScript.RegisterClientScriptInclude(Me.GetType(), "AdSense", "http://pagead2.googlesyndication.com/pagead/show_ads.js")
End If
' Add javascript code (AdSense Code) [Google AdSense]
Dim urchinTracker As String = "<script type=""text/javascript""><!-- " & _
"google_ad_client = ""xxx"";" & _
"google_ad_width = 250;" & _
"google_ad_height = 250;" & _
"google_ad_format = ""250x250_as"";" & _
"google_ad_type = ""image"";" & _
"google_ad_channel ="""";" & _
"//--></script>"
If (Not Page.ClientScript.IsClientScriptBlockRegistered("AdSenseCode")) Then
Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "AdSenseCode", urchinTracker)
End If
However I have no idea of how to place the javascript code inside the Asp:Panel so that the banner appear there.
I need to make this at runtime.
Could somebody help me out with this?
Thanks,
Miguel
|
|
|
|
|
If you want to place something inside the Panel control, you can extend the Panel control and override the RenderContents method and emit the client side stuff there.
|
|
|
|
|
I am really sorry but I got completly lost.
Could you give me a simple example.
Thanks,
Miguel
|
|
|
|
|
Something looks like:
public class ExPanel : Panel
{
protected override void RenderContents(HtmlTextWriter writer)
{
base.RenderContents(writer);
writer.Write("my client side stuff goes here");
}
}
Another option is that you can simply place the Label/Literal control inside the Panel, then assign the client side stuff to the Text property of these controls.
|
|
|
|
|
Hi guys,
I am considering using DotNetNuke as a content management on my website. Has anybody used this product and if so what was the general opinion of it?
"a fool will not learn from a wise man, but a wise man will learn from a fool"
"It is hard to fail, but it is worse never to have tried to succeed." - Theodore Roosevelt
"Success is going from failure to failure without losing your enthusiasm." - Winston Churchill
My Website || My Blog
|
|
|
|
|
I am trying to show an image of a flag in a grid column based on a value in another column.
I thought the code below would work (its vb.net). If I replace the <img... html with just normal text - the normal text is shown.
But for some reason I can never get the image to display.
Is there another way I should be doing this ?
Dim GridItem As DataGridItem
For Each GridItem In DataGrid1.Items
If CType(GridItem.Cells(5).Text, Integer) = 1 Then
'put in flag here
GridItem.Cells(1).Text = "<img src=flag.gif>"
End If
Next GridItem
|
|
|
|