|
I have tried a callback method in asp.net 2.0 with the help of following
Serverside code
---------------------
sOK = this.ClientScript.GetCallbackEventReference(this, "message", "ShowServerTime", "context", "OnError", true );
-------------------
void ICallbackEventHandler.RaiseCallbackEvent(string eventArgument)
{
//some internal proces
}
--------------------------------
string ICallbackEventHandler.GetCallbackResult()
{
return "OK"
}
-----------------------
Clientside Code
function fnTest()
{
if(confirm("Are u sure?"))
{
<%=sOK%>;
}
}
function ShowServerTime(timeMessage, context)
{
alert(timeMessage);
}
function OnError()
{
alert('An unhandled exception has occurred:\n');
}
----------------------------------
my problem is client side method ShowServerTime does not called
if any one known about this help me
thanks in advance
Known is a drop , Unknown is an Ocean
|
|
|
|
|
I have big problem with this error ..
my site is Ok in my local PC but when i upload the site i see this error in the some page that use ../images in the src of images and when i remove the ../ the problem is solved
how can i solve it ????
with thanks
|
|
|
|
|
try using
~/
instead of ../
|
|
|
|
|
ok but i can't use ~ in my HTML code ( my master Page ) in the src of my tags
|
|
|
|
|
|
MHASSANF wrote: when i remove the ../ the problem is solved
how can i solve it ????
If you solved it, why do you need to ask how to solve it?
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
from a popup window?
In my page1.aspx i have a session variable.
and in this page when the user clicks a button i popup a new page called page.aspx
i can't access the session variable in this popup, why?
|
|
|
|
|
Dunno, are you sure it's been set ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i am using following code in page load event.
Session("CurrentPageURL") = "http://" & Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("URL")
then in the popup i am using this code
lbl1.Text = Session("CurrentPageURL").ToString()
|
|
|
|
|
Hi All,
I have a problem whlle loading images.
The images which I am loading belongs to another site .These image updates after every refresh . To be more specific this is an online chart having all the commodities price.
So if client net is slow then obviously the image will take lot of time to load .When the Image is under the process of loading the client is not able to do any operation on the web page i.e the page gets hanged.
I wanted to know that is there any method in Ajax to make the Loading of image independent from the other operations in the website ?
Thanks in advance...
|
|
|
|
|
You can use javascript to change the url an img tag points to.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i have got ten substring in the label text for my search result.
can i change the color of the all those ten substring in the label control?
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
try this:
http://aspnet.4guysfromrolla.com/articles/072402-1.aspx
|
|
|
|
|
I am asp programmer now I am updating my skills and learning ASP.net. I am using VS2005. using Accessdatasource I fetched records from database. But I am not able to find method to add records to Database.
modified on Wednesday, May 14, 2008 8:22 AM
|
|
|
|
|
cant you just use an insert statement
|
|
|
|
|
That I can use but I am confused with connections. I used to use command for setting connection in asp here I am using Access datasource. So how I will define connectionname to my query.
In add_subadmin.aspx I added 3 text boxes and onbutton click a function is called in default.aspx.cs file . Having this code.
DataSet dataSet1 = new DataSet();
DataRow newCustomersRow = dataSet1.Tables["subadmin"].NewRow();
newCustomersRow["name"] = subname.Text;
newCustomersRow["username"] = username.Text;
newCustomersRow["password"] = password.Text;
dataSet1.Tables["subadmin"].Rows.Add(newCustomersRow);
error says:
Compiler Error Message: CS0103: The name 'subname' does not exist in the current context
Source Error:
Line 22: DataRow newCustomersRow = dataSet1.Tables["subadmin"].NewRow();
Line 23: newCustomersRow["name"] = subname.Text;
Line 24: newCustomersRow["username"] = username.Text;
Line 25: newCustomersRow["password"] = password.Text;
|
|
|
|
|
Check this out:
http://www.aspfree.com/c/a/Microsoft-Access/Connecting-to-a-Microsoft-Access-database-with-ASPNET/"
|
|
|
|
|
Thanks a lot its really good article but its in VB.net
I am looking for C#
|
|
|
|
|
I'm sure there are plenty of converters out there, expecially if all you need is the connection string
|
|
|
|
|
Hi,
I am having two menu controls (Tabs) in a page.
Now how to programmatically unselect the selected tab in Menu1 when the user selects another tab from Menu2 ??
Plz help,
JJ
|
|
|
|
|
What do you mean unselect one? If you click on a tab button then another, the focus is set to the 2nd one.
Do you mean the actual tabbed pages, if so use panels to display and hide depending on tab chosen
|
|
|
|
|
I am having two different menu controls (Tabs) on the same page. When I click on the tab button, the focus is set to the selected tab in the same Menu Control. Its fine..
But Problem is with second Menu control on the Same page.
When I click on the Tab in the second Menu control, The focus should come to the second Menu control (till here it is working fine)
and BUT how to release the focus on the first menu control??
~JJ
|
|
|
|
|
Hi,
I have a requirement where there will be a drop down list in the page.
When i'll select any item from list, page will postback and check if any
subitem exists for selected item.If exists then all subitem will populate
in new drop down .This will happen recursively means if subitem again
has new subitem then again new drop down will populate.New drop down will
populate on selection of previous dropdown item select index change.
ex: DD1 - Country->DD2- State->DD3-District->DD4 - Village->........
Any idea how can i implement this..??
|
|
|
|
|
I found this to be a good control, its an ajax control:
http://www.asp.net/ajax/ajaxcontroltoolkit/samples/CascadingDropDown/CascadingDropDown.aspx
|
|
|
|
|
Thanks for reply!!
But i'm implementing it in VS.NET 2003 and i am not suppose to use AJAX.
|
|
|
|