|
Why are you doing the first part under the rowcommand click? This means that you only get the message on your second click of the button? Is that right?
|
|
|
|
|
misspelled , i was actually row bound data.
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
Hi all,
I have a gridview in which i used button field to delete record from database on "onrowcommand" event of gridview. It works properly. But I want confirmation of delete before deleting record from database on client click. so i think for that i need to call javascript confirm box on click and if it returns true then only onrowcommand event of control to be executed. Is it possible that way.if yes then suggest the code otherwise suggest another way.
DataKeyNames="ID" DataSourceID="SqlDataSource1" PageSize="15" AllowSorting="True" OnRowCommand = "GridView1_RowCommand" CellPadding="4" ForeColor="#333333" GridLines="None" style="width: 100%">
Text="Delete" ImageUrl="~/images/deleteicon.jpg">
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "delete_property_details")
{
int index = Convert.ToInt16(e.CommandArgument);
other code placed here
}
}
|
|
|
|
|
Hi all,
I have a gridview in which i used button field to delete record from database on "onrowcommand" event of gridview. It works properly. But I want confirmation of delete before deleting record from database on client click. so i think for that i need to call javascript confirm box on click and if it returns true then only onrowcommand event of control to be executed. Is it possible that way.if yes then suggest the code otherwise suggest another way.
DataKeyNames="ID" DataSourceID="SqlDataSource1" PageSize="15" AllowSorting="True" OnRowCommand = "GridView1_RowCommand" CellPadding="4" ForeColor="#333333" GridLines="None" style="width: 100%">
Text="Delete" ImageUrl="~/images/deleteicon.jpg">
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "delete_property_details")
{
int index = Convert.ToInt16(e.CommandArgument);
other code placed here
}
}
|
|
|
|
|
put javascript on OnClientClick event of delete button.
javascript:
<script language="javascript" type="text/javascript"><br />
function DeleteRecord()<br />
{<br />
if(confirm("Do you want to delete this record?")==true)<br />
{return false;}<br />
else<br />
{return false;}<br />
}<br />
</script><br />
I hope this will help you.
Regards.
"If I were not myself, I would like to be somebody like myself."
|
|
|
|
|
ImageUrl="~/images/deleteicon.jpg">
How to show multiple image in imageurl using ButtonField
Hi,Im Razana
|
|
|
|
|
Hi,
this is very common, but I don't know how.
How to write this in C#:
For i = 0 To aDirs.GetUpperBound(0)
as I don't see the step, which is not i++...
|
|
|
|
|
for ( i =0; i==aDirs.GetUpperBound[0]; i++ )
{
}
|
|
|
|
|
well, there is still something wrong.
Here is my code that I'm trying to rewrite in C#.
I used while and as I debugged, it is not working properly.
For i = 0 To aFiles.GetUpperBound(0)<br />
<br />
' Get the position of the trailing separator.<br />
posSep = aFiles(i).LastIndexOf("\")<br />
<br />
' Get the full path of the source file.<br />
sFile = aFiles(i).Substring((posSep + 1), aFiles(i).Length - (posSep + 1))<br />
Try<br />
<br />
<br />
' Copy the file.<br />
System.IO.File.Copy(aFiles(i), destDir + sFile, False)<br />
addToConsoleWindow("Copied " & sFile & " to " & destDir)<br />
Catch ex As Exception<br />
If overWrite = False Then<br />
errorBoxShow(ex.Message)<br />
addToConsoleWindow("Skipping..." & ex.Message)<br />
Else<br />
System.IO.File.Copy(aFiles(i), destDir + sFile, True)<br />
addToConsoleWindow("Overwriting old " & sFile & " in " & destDir)<br />
End If<br />
<br />
End Try<br />
Next i
Thank you for helping me.
|
|
|
|
|
|
(via Instant C#)
for (i = 0; i <= aDirs.GetUpperBound(0); i++)
{
}
Ack - how do you specify "less than or equal to" in this forum?? (I unchecked "Ignore HTML tags ...").
David Anton
http://www.tangiblesoftwaresolutions.com
C++ to C# Converter
C++ to VB Converter
C++ to Java Converter
C++ to Ruby Converter
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: converts C# to C++/CLI and VB to C++/CLI
|
|
|
|
|
I just want to know the IP Address of the local host using Asp.Net2.0
Response.Write(Request.UserHostAddress.ToString()); ...Here i dint get the correct IP Address...Any Sugessions
Thanks in Advance...
Erasers are for people who are willing to correct their mistakes.
|
|
|
|
|
|
Hey guys,
I totally lost it... I wrote a simple html editor on a website where users can are able to edit text to bold, italic or make a link of the selected text... The tags are written
[b]bold[/b]
[i]italic[/i]
[link url=http://www.google.com]clickable text[/link]
The bold and italic tags are simple but I can't figure out how to replace the link to a html tag <a href="url" etc.
Can anyone help me?
|
|
|
|
|
Eduard Keilholz wrote: [link url=http://www.google.com]clickable text[/link]
You need to use a regular expression to find link from the pattern. See the following code
string LinkString = "[link url=http://www.google.com]clickable text[/link]";
string RegExPattern = "\\A\\[link\\surl=(.*)].*\\[/link]$";
string FinalLink = string.Empty;
if (Regex.IsMatch(LinkString,RegExPattern))
{
FinalLink = Regex.Match(LinkString, \\A\\[link\\surl=(.*)].*\\[/link]$").Groups[1].Value;
} You have the link on FinalLink variable. Append HTML anchor tags to this to form a normal link.
Hope this helps
|
|
|
|
|
Yeah, you're pretty close however it does not work correctly with surrounding text and if the link occurs more than once within the text
for example this text should link to [link url=http://www.zonderpunt.nl]zonderpunt.nl[/link] and clicking [link url=http://www.google.com]here[/link] should link you to google...
I want to replace the text above and change the two links to working HTML links....
|
|
|
|
|
Eduard Keilholz wrote: it does not work correctly with surrounding text and if the link occurs more than once within the text
For working with multiple link, you need alter the regular expression. Now it checks the word boundaries. You can just remove that and it will find anywhere in the text. What do you mean by surrounding text ?
|
|
|
|
|
Hi,
I have datalist in which there are five image controls , but what i want is that ,in each image control i have to display 3 different images one by one, just like as adrotator control does.
how can i achieve that ,
thanks and regards
|
|
|
|
|
You should load all images firstly. then, you can use the Javascript to change the image on the fly..
|
|
|
|
|
Hi Friends,
i having two html radio buttons,one dropdownlist control and textbox control when i select first radio button it should display the empty textbox and dropdownlist control should be hide and datagrid also should hide,when i m clicking second radio button the textbox should be hide and dropdownlist control should appear.when i m selecting dropdownlist values the result should come in datagrid,up till this working when i m clicking edit,save,cancel or delete button in datagrid the selected radio button getting unchecked.Kindly tell me how to check the radio button.Please help me....
Thanks & Regards
Senthil Kumar
|
|
|
|
|
Which radiobutton are you using? I mean, server controls or just HTML control? I think if you are using the server control, you should not have that problem.. However, in order to solve this, I suggest you to store the radiobutton value in cache or session and set it back in pageload...
|
|
|
|
|
|
then, I suggest you to store the radiobutton value in cache or session and set it back in pageload...
|
|
|
|
|
Hi all,
i am setting the selected value of a calander like this...
calendarDateOfBirth.SelectedDate = Convert.ToDateTime(_member.DateOfBirth)
how do you make the calander display this selected date now??? i know the date is correct but i dont know how to display it on the calander?
I can write the value to the database and it works fine with the correct value i just dont know how to display it... please help
Thank you in advance.
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
How do you want to display it ? What calendar control are you using ? Why doesn't the SelectedDate property solve your problem ? Is Convert.ToDateTime working ?
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|