|
hi christian,
I have solved out this problem thanks for your reply i got the answer from their.
really appreciating your way of reply.
i understand what my mistake is.
thanks for your reply.
|
|
|
|
|
hi,
my web application is able open excel template on my system(server),
when i run this application on client machine(another system)
every thing works fine but excel template is not opening
can anybody knows wht i have to,
thanks
Afreen
|
|
|
|
|
Is EXCEL installed on the client machine?
Regards - J O H N -
|
|
|
|
|
|
iam having a textbox in that i write some text and press enter then a function should execute .
|
|
|
|
|
You can use AJAX to execute a server side function
|
|
|
|
|
hi navaneeth how ru ... this is id by writting the code in server button click .and i called the button click in javascript like this
var obj
obj=document.getElementById("btngetdata");
obj.click();
still its not getting is any other with out using ajax
|
|
|
|
|
I have created one library which will help to call button event when enter key is pressed. Check this[^] and download the library
|
|
|
|
|
DefaultButton.SetDefaultButton ( control , btButton )
where i should write this one
|
|
|
|
|
You can write in page load.
|
|
|
|
|
txtBox1.Attributes.Add("onkeydown", "if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('"+Button1.UniqueID+"').click();return false;}} else {return true}; ");
this is working sir thanks u sir
|
|
|
|
|
jagadeeshkumar2106 wrote: how can i call code behind function through java script function (help plz)
maybe. you can use ajax.
function fireFunc() {<br />
var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;<br />
if (keyCode == 13) {<br />
<br />
var req = false;<br />
<br />
if (window.XMLHttpRequest) {<br />
req = new XMLHttpRequest();<br />
}<br />
else if (window.ActiveXObject) {<br />
req = new ActiveXObject("Microsoft.XMLHTTP");<br />
}<br />
req.open('POST', "http://urdomain.com/urpage/aspx", true);<br />
req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');<br />
req.onreadystatechange = function() {<br />
if (req.readyState == 4) {<br />
}<br />
}<br />
req.send("querystring");<br />
<br />
}<br />
}<br />
<br />
<br />
<input type="text" value="Check Answer" onkeypress="fireFunc()" >
|
|
|
|
|
You will have to put your function/procedure in a page and this page needs to be called as specified by Michael Sync. You can send any value to it using the querystring.
Nav
|
|
|
|
|
i want the code to run a procudere when enter key is pressed in asp.net apllication .the key event should happen when i press the enter key in textbox.
|
|
|
|
|
Use Javascript function and call it on the server side.
TextBox1.Attributes.Add("onkeypress","CheckKeyCode();")
Validate the key as:
function CheckKeyCode()
{
if(event.keyCode == 13)
{
return true;
}
else
{
return false;
}
}
God is always with you.
|
|
|
|
|
jagadeeshkumar2106 wrote: i want the code to run a procudere
this procedure is written in Javascript? if yes, chk the example below..
Example.
function fireFunc() {<br />
var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;<br />
if (keyCode == 13) {<br />
yourprocedure();<br />
}<br />
}<br />
<br />
<br />
<input type="text" value="Check Answer" onkeypress="fireFunc()" >
|
|
|
|
|
sorry. i didn't see Saranya Devi's post.
|
|
|
|
|
sir the procedure is in code behind and it should call in javascript
|
|
|
|
|
Call your procedure like this:
function getProcedure()
{
var obj
obj=document.getElementById("button2")
button2.click();
}
"severside_handler" is the codebehind function that hander the button's
server click event.
God is always with you.
|
|
|
|
|
var obj
obj=document.getElementById("btngetdata");
obj.click();
i wrote like this and i kept two alerts before and after .but iam getting the two messages in the alert but iam not getting the this obj.click.
|
|
|
|
|
Try btngetdata.click();
God is always with you.
|
|
|
|
|
i posted the answer in your new post..
|
|
|
|
|
Hi i am getting error as:
"Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index "
In this error occur in user control...,
In that control i have repeater control...,
In that i bind some datas from my table...,
In my main tab...,
First one contained 4 subtabs and second one contained 2 subtabs...,
Suppose if i select first main tab from that 5th subtab then if i select second main tab...,
It will show this error, becoz second one have only 2 subtabs...,
The pointer will refer the 4th tab in 2nd main tab...,
So,its out of range...,
How to show default the first subtab whenever select another maintab?,
This is my code:
Public Sub SelectSubTab(ByVal index As Integer)
If ((index < 0) _
OrElse (index > SubTabText.Count)) Then
index = 0
End If
ViewState("CurrentSubTabIndex") = index
BindData()
Dim ev As SelectionChangedEventArgs = New SelectionChangedEventArgs
ev.TabPosition = CType(ViewState("CurrentTabIndex"), Integer)
ev.SubTabPosition = index
RaiseEvent SelectionChanged(Me, ev)
End Sub
Help me...,
Regards,
Mageshh
|
|
|
|
|
I think you need to change condition
OrElse (index > SubTabText.Count)) Then
use
OrElse (index >= SubTabText.Count)) Then
Nav
|
|
|
|
|
Try
index > SubTabText.Count - 1
Regards,
Riza Azmi
Simple thing should be simple, complex thing should be possible
|
|
|
|