|
Hi All,
I have a button on page.
when user click this button it will call a server side function, which check some data in database. then there will be confirmation message like "Record already exist, Do you want to continue?". if user click (OK)Yes then it will process further in database using another server side function. otherwise it will not process further.
Please tell me how can I do this using javascript ?
I need to show confirmation message.
Thanks.
Regards,
Sunil
modified on Monday, September 8, 2008 4:27 AM
|
|
|
|
|
hi,
give this code in the button click event
onclientclick = "return confirm('Record already ....continue?);"
it will popup a window asking confirmation
if u click yes then 1ly it will invoke server side validation
if u click no it will b in the same page and no event will get fired.
T.Balaji
|
|
|
|
|
You can use ajax to call server side function by javascript.
|
|
|
|
|
hi i need a tab and i have it
but can someone help me how to make it add tabs to itself just as like as igoogle
tnx
Nika Asgari
|
|
|
|
|
which type of tab you are talking about? can you be please be more specfic ? then can we help you.
|
|
|
|
|
Be specific about tabs dear!
♫ 99 little bugs in the code,
99 bugs in the code
We fix a bug, compile it again
101 little bugs in the code ♫
|
|
|
|
|
Hi,
Can abybody help me in converting the following VB statement to c#
Dim buffer(streamObj.Length) As Byte.
Thanks in Advance
|
|
|
|
|
Try this
byte[] buffer = new byte[streamObj.Length + 1];
And don't forget to vote the message
|
|
|
|
|
sumit7034 wrote: streamObj.Length + 1
WHY?
|
|
|
|
|
Because VB uses the highest index when declaring array, while C# uses the size.
The code is an exact translation of the VB code, but the VB code is probably not correct in the first place. It should most likely use streamObj.Length - 1 to create a buffer the same size as the stream, and the translation of that to C# would use streamObj.Length .
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Guffa wrote: Because VB uses the highest index
Great. It is new to me and thanks for correcting me. So it is not a zero based index?
|
|
|
|
|
Yes, it's zero based, but the upper limit in the Dim statement is the highest index in the array, not the size of the array.
Dim buffer(3) As Byte 'declares an array with four bytes
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Great Guffa... nicely explained.
Jey
|
|
|
|
|
|
Blue_Boy wrote: Bookmark this converter from VB.NET to C#[^]
It works for simple statements not for all.
|
|
|
|
|
Try this
byte[] buffer= null;
buffer=new byte[streamObj.length];
|
|
|
|
|
byte[] buffer = new byte[streamObj.Length + 1];
|
|
|
|
|
Use Always for convertion.........
http://labs.developerfusion.co.uk/convert/vb-to-csharp.aspx
|
|
|
|
|
Hi All
I'm trying to create a simple aspx page by pulling info from an existing excel sheet into a data grid.
What I need to do is apply some conditions to this so that certain info is displayed depending on certain conditions.
eg datagrid:
name nickname URL link
gerry http://gerry.com gerry
william bill http://william.com bill
What I need is if there's a value in nickname then the Text for the link will be that value, if not then it will be the name value.
I've tried creating a template column but can see anywhere to put an if statement in there either.
I'm new to all this and am not looking for someone to do this for me, just point me in the right direction as I want to understand why I'm doing what I'm doing.
I appreciate any pointers anyone can give me.
Rgds
gerryR
|
|
|
|
|
There are two ways you can do this:
Either in the ItemDataBound[^] event, or call a function[^] directly from your template column, passing the two values (name and nickname)
|
|
|
|
|
Thanks for that,
Couldn't get my head around the databound method, I'll save that for another day. Got the function method working although I ran into another problem with that (null values), I'll post a seperate message about that.
Thanks again
gerryR
|
|
|
|
|
hi all,
I got an error when i am trying to connect a web application on my local system with a remote DB.The error is
"An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
the web.config file contains the connection string
<add name="ConnectionString" connectionString="Data Source=Servername;Initial Catalog=GospelNews;User ID=userID;Pwd=passwordd;Connect Timeout=30;Trusted_Connection=Yes" providerName="System.Data.SqlClient"/>
Can anybody help me to come out of this problem.
Thanks in Advance
|
|
|
|
|
Check to make sure the connection works on a local machine, if it does then probably you're blocked by their firewall.
For security reasons many servers prohibit connection from a remote computer. I believe you need to contact web server support, they may let you give them an ip and they let it pass the firewall.
"In the end it's a little boy expressing himself." Yanni
|
|
|
|
|
There are several reasons for this, but first thing I noticed is that you use Named Pipes. Is this the protocol you want? Typically it's not on and it won't go through firewalls
Mika
|
|
|
|
|
How can i change it to tcp/ip?
|
|
|
|