.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

java script to call serverside function

Posted By:      Posted Date: September 14, 2010    Points: 0   Category :ASP.Net
hi i want java script by which i can call my asp.net (vb) function which i have written in aspx.vbi just using the vb function to change and check value of hiddenfild and other controln dont want to use ajax control toolkit , i wat to perform some action after spefic time interval

View Complete Post

More Related Resource Links

How to call java script in grid rowdatabound event

Guys I want some help on this issue my code goes like this protected void grdResults_RowDataBound(object sender, GridViewRowEventArgs e)    {        if (e.Row.RowType == DataControlRowType.DataRow)        {                       TextBox txtQty = e.Row.Cells[1].FindControl("txtQty") as TextBox;            Label lblTWeight = e.Row.Cells[9].FindControl("lblTWeight") as Label;            Label lblTMHRS = e.Row.Cells[10].FindControl("lblTMHRS") as Label;            Label lblTLabor = e.Row.Cells[11].FindControl("lblTLabor") as Label;            Label lblTMaterial = e.Row.Cells[12].FindControl("lblTMaterial") as Label;            Label lblTCost = e.Row.Cells[13].FindControl("lblTCost") as Label;            string onComp = "getTotalComplete(document.getElementById('" + txtQty.ClientID + "'));&q

Problem with IndexOf function in Java script?


Hi all,  i have one problem while using Index Of function in java script. I am using this in this way:

var ss=(document.getElementById('<%=HiddenField1.ClientID%>').value.indexOf(","+document.getElementById('<%=yyy.ClientID%>').value+"-"+document.getElementById(str).value,20));                       

databind from a custom function call


in datalist templatefield, i want to bind an imagebutton's visible property. the scenario is .. it is a picture comments page like one in facebook. if its your own comment, the delete button is shown, otherwise not.  the problem is .. for the imagebutton i want to set visible = false, if the user logged in is the same user as the one who commented. how can i do that ? please help

currently im using this code on datalist databind event. but the label is returned as null

public bool set_visibility()
        Label lb = DataList3.FindControl("Label7") as Label;

        if (lb.Text == Session["user_id"].ToString())
            return true;
            return false;

findcontrol dosent return the control.

how to call thickbox function in codebehind



i want to call thickbox.js function in codebehind , below the code in jquery

i want to call below code in codebehind

function tb_remove() {
    if (typeof document.body.style.maxHeight == "undefined") {//if IE 6
        $("body","html").css({height: "auto", width: "auto"});
    document.onkeydown = "";
    document.onkeyup = "";
    return false;

write a java script to show a msg wan to colse yes or no

 write a java script to show a msg wan to colse yes or no.if user select yes then another function is call then he select no then nothing happend

ssrs 2008 R2 - report parameter with no default set throws java script error

We have recently upgraded from SQL Server 2008 to SQL Server 2008 R2....I am experiencing a problem with my report parameters on my SSRS reports. It seems that my report parameters that I do not have a specified 'default' value throws a java script error when I try and run/render the report under R2.  As soon as I put a 'default' value on the report param, everything is fine.  However, that is not the behavior we need for our reports...the user needs to pick their selection. Can anyone shed some light on this, it seems to be an AJAX problem...I need to be able to have report parameters with a list of values, but no 'default' value on the parameter.

Call function Vb in ASP

Does anyone know if is possible fill one column using a function in VB ? I thought in something like this but I don't know what i put in one part. Thanks.   <Columns> <asp:TemplateField HeaderText = "A" > <HeaderTemplate> <table> <tr> <td>Teste</td> </tr> </table> </HeaderTemplate> <ItemTemplate> <asp:Label ID="lblTeste" runat="server" Text='<%# ???????? %>' /> </ItemTemplate> </asp:TemplateField>  

accesing controls on cotent pages using java script

i had a webform which used javascript for calander <head> <script language="javascript" src="Calendar.js" type="text/javascript"></script> </head> . . . <asp:TextBox ID="txtDateLeaving" runat="server" Enabled="false"></asp:TextBox> <a onclick="showCalendarControl(txtDateLeaving);" href="#"> <img src="calendar.gif" style="width: 20px; height: 20px" border="0" alt="cal" /></a> it was wrking perfectly . .but i am not able to run it using master pages.. when i try to access control on the content pageit says txtDateLeaving is not defined..can anybdy tell me how shld i achieve the same functionality using master n content pages..

Calendar.aspx page Refresh only Once + Java Script

Hi Experts, Following script works perfect (refresh only once after 5 seconds and stops but for some reason if somebody clicks next month then it keeps refreshing for 5 seconds. Can you please put the following code in your calendar.aspx page and check if you can get rid of the continuous refresh if somebody selects next month otherwise it works fine. Please provide the updated script <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> <title>Refresh test</title> <script type="text/javascript">   window.onload=function(){     url = window.location.href;     qIndex = url.indexOf("?");     if( qIndex != -1 ){       getData = url.substr(qIndex+1, url.length-1);       if(getData != "refreshed=1"){         refresh();       } else {         myDiv = document.getElementById('content');         myDiv.innerHTML = "This is the second and final time the page loaded.";       }    

Java function needs to return only two places

I have this java function that works great, but I need it to only return two decimal places like 333.33. Currently it returns 333.3333333333. What can I do to modify this? plannedpmt = (pledgedamt / numberpayments) 

java script problem !

hi.i have this code : <asp:TextBox ID="TextBox1" runat="server" Width="92px"></asp:TextBox> <asp:Button ID="Button1" runat="server" Text="ok" Width="64px" /> <asp:CheckBoxList ID="CheckBoxList1" runat="server" RepeatDirection="Horizontal"> <asp:ListItem Value="1"></asp:ListItem> <asp:ListItem Value="2"></asp:ListItem> <asp:ListItem Value="3"></asp:ListItem> </asp:CheckBoxList> and in button i have this code : If TextBox1.Text.Contains("1").ToString Then CheckBoxList1.Items.Item(0).Selected = True Else CheckBoxList1.Items.Item(0).Selected = False End If If TextBox1.Text.Contains("2").ToString Then CheckBoxList1.Items.Item(1).Selected = True Else CheckBoxList1.Items.Item(1).Selected = False End If If TextBox1.Text.Contains("3").ToString Then CheckBoxList1.Items.Item(2).Selected = True Else CheckBoxList1.Items.Item(2).Selected = False End If how i can do this code with javascript instead of vb code ?

Problem with java script basic script constraint.

 hi my code isfunction checkValue(){ if(''==document.getElementById ('textbox1').value) { alert('Please enter a value'); } }   and i am calling it on a button click event but its not responding. html code:  <asp:Button ID="btnButton" runat="server" Text="Button" onclick="checkValue()"/>   please help.

how to check one time java script file download not every session

how to check one time java script file download not every session

Calling Serverside PageMethod function from an external page Client Side Code ?

there is many examples on the net about this issue .like this :http://sappidireddy.wordpress.com/2008/03/31/how-to-call-server-side-function-from-client-side-code-using-pagemethods-in-aspnet-ajax/But all javascript codes are in same aspx file including codebehind WebMethodsI wantto call a pagemethod from a js which is in another page.something like this : (javascript code but not in same aspx)PageMethods("www.externalpage.com").GetContactName(ctrl.value, CallSuccess, CallFailed, dest)).or calling WebMethods from javascript must only be defined in codebehind with linked aspx fileonly avaible in same aspx ?cant I call a Webmethod in a.aspx from a javascript in b.aspx ?any clue ?thanks.

Can you call a javascript function from code behind?

Call you cal a javascript function from the code behind? If so how??? 

form sliding using java script

how can we use sliding forms in asp.net

Can you call Javascript function from the codebehind?

 Can you call Javascript function from the codebehind?  How???
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend