|
No that is working fine.Problem is in "as custo(.....)".
|
|
|
|
|
Your SQL is broken. And so is your logic, this is not the SQL forum. Your from needs to be AFTER all the column specifications.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
Hi All,
I am doing save operation on button click.........after save successful i want to display one message to Save successful using how to do this please any one help me............
Thanks,
Amit
|
|
|
|
|
I use this code :
Alert class
using System.Web;
using System.Text;
using System.Web.UI;
public static class Alert
{
public static void Show(string message)
{
string cleanMessage = message.Replace("'", "\'");
string script = "<script type="text/javascript">alert('" + cleanMessage + "');</script>";
Page page = HttpContext.Current.CurrentHandler as Page;
if (page != null && !page.ClientScript.IsClientScriptBlockRegistered("alert"))
{
page.ClientScript.RegisterClientScriptBlock(typeof(Alert), "alert", script);
}
}
}
Now from Code-behind :
void btnSave_Click(object sender, EventArgs e)
{
try
{
SaveSomething();
Alert.Show("You document has been saved");
}
catch (ReadOnlyException)
{
Alert.Show("You do not have write permission to this file");
}
}
If you dont want all this, just use :
this.ClientScript.RegisterClientScriptBlock(this.GetType(), "alertkey", "alert(\"Successfully saved.\");", true);
Hope this would help you.
|
|
|
|
|
If the save does a postback, then why do you need javascript ? If it doesn't, then I guess you need to throw a message into your AJAX code.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
how can i use asp button control in ajax accordion control
|
|
|
|
|
Perhaps you should look at this example.[^]
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
Hi There,
I have a problem,I had written a java script funtion to retrieve key code value.When I press "." and "Delete" I am getting same keycode and Key char in Mozila 2.0.But this code is working fine in IE 6.0.Can anybody tell me how to diffrenciate between these two key as there is same keycode is present.
Thanks,
|
|
|
|
|
Try to search on google.[^]
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
Hi
i have sample web form which have a gridView. also i add a DataSet to my web app and add some tables from server explorer to it as my dataSource.
my question is that how to set this DataSet object as dataSource for my gridView (in designTime) instead of using sqlDataSource ?
thanks
|
|
|
|
|
Use GridView DataSource Property.
|
|
|
|
|
Hi
as u can see in my question. i want to do this in design time.
|
|
|
|
|
Use
Gridview1.datasource = dataset1
gridview1.databind()
|
|
|
|
|
how can i find the difference between two calendar dates to calculate number of days and display it in a label.
|
|
|
|
|
TimeSpan difference = myFirstDate - mySecondDate;
Man who stand on hill with mouth open wait long time for roast duck to drop in
|
|
|
|
|
thank you for replying
its showing an error "Error 3 Cannot implicitly convert type 'System.TimeSpan' to 'string'"
what should i do.
|
|
|
|
|
Mathew P V wrote: its showing an error "Error 3 Cannot implicitly convert type 'System.TimeSpan' to 'string'"
Eh?! You might like to read the MSDN documentation on TimeSpan to find out how it works and how to get data out of it.
No where in my advice would you have got the error above. Just blindly converting things to strings is often unwise.
Man who stand on hill with mouth open wait long time for roast duck to drop in
|
|
|
|
|
thank you for the valuable reply,
i am new to asp.net. please give me some suggestions so that i can improve.
|
|
|
|
|
Mathew P V wrote: i am new to asp.net. please give me some suggestions so that i can improve.
If you are asking for help then show code so we can see what you are doing. Asking us to guess based on vague or incomplete descriptions does not (as Dr. Cox [Scrubs] would put it) "help me to help you".
Man who stand on hill with mouth open wait long time for roast duck to drop in
|
|
|
|
|
i used
timespan diff=calendar1.selecteddate.substract(calendar2.selecteddate); and now its working thank you for your valuable suggestion i will do the same.
modified on Tuesday, June 2, 2009 6:06 AM
|
|
|
|
|
Hi , iam still newbie in asp.net
I have no idea how to pass parameter to event handler in timer
this the code that i have got
<br />
private Timer Alert = null;<br />
<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
Alert = new Timer();<br />
Alert.Start();<br />
Alert.Elapsed = new ElapsedEventHandler(Alert_Timer_Elapsed);<br />
AlertTimer.Interval = 30000;<br />
}<br />
<br />
private static void AlertTimer_Elapsed(object source, ElapsedEventArgs e)<br />
{<br />
}<br />
<br />
i want int alerttimer_elapsed has a string / object variable as parameters but i am confused how to do it.
thanks guys
|
|
|
|
|
arifliminto86 wrote: i want int alerttimer_elapsed has a string / object variable as parameters but i am confused how to do it.
You don't. The method has all the parameters it is ever going to have - otherwise the signature of the method wouldn't look like Timer.Elapsed event handler.
Also, where would you set the string value from?
Store it as a field on the class and the event handler can pick it up (once you remove the static on the method)
Man who stand on hill with mouth open wait long time for roast duck to drop in
|
|
|
|
|
|
hi
please write code by which .swf run in most of browser
thanks
Azad Yadav
|
|
|
|
|
I have done, plenty of times. If you want to know how to do the same, perhaps you need to try google ?
This is not an ASP.NET question, ASP.NET has no support for swf files, nor can it. That's handled by the browser, and you write HTML inside your ASP.NET site to play them. I've done that, too.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|