|
Regex.Replace(str, @"[^\w]", "");
is a method available in System.Text.RegularExpressions namespace.
|
|
|
|
|
try this
str.str.Replace("'","");
|
|
|
|
|
|
Hi..
I have a label in footer template in repeater control i want to access this label on submit button's click event in .cs page...
|
|
|
|
|
How can I set the "Title" of a webpart = Page.Title.ToString()?
Currently I have a Label in the ZoneTemplate and everything works but I need the title to change to the page title dynamically.
Thanks!!
Illegal Operation
|
|
|
|
|
Hi there!
I have a WebForm (ASP.NET 2.0) with a textbox and two buttons, one of them (sendButton) to send the textbox's content, and the other one (cancelButton) to cancel the operation.
I need when the user write something in the textbox and then press 'Enter' key, the textbox's content will be sent to the server. (The same thing like if he push the sendButton.)
I have some WebForms with that behavior: 'Enter' key has the same effect like a button, but I don't see difference.
Can somebody help me?
Thank you in advance.
[Adrián Córdoba]
|
|
|
|
|
<asp:textbox id="txtControl" runat="server" onkeydown="if(event.keyCode==13) ButtonName.click(); " xmlns:asp="#unknown"></asp:textbox>
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.
|
|
|
|
|
I think you can also use:
<form id="form1" runat="server" defaultbutton="sendButton">
If you're using master pages, you have to set the default button for each page manually like this (in you Page Load handler):
HtmlForm frm = (HtmlForm)Master.FindControl("form1");
frm.DefaultButton = sendButton.UniqueID;
Worth a shot anyway.
- S
50 cups of coffee and you know it's on!
A post a day, keeps the white coats away!
|
|
|
|
|
|
Maybe post on main thread....
- S
50 cups of coffee and you know it's on!
A post a day, keeps the white coats away!
|
|
|
|
|
Steve Echols wrote: If you're using master pages, you have to set the default button for each page manually like this (in you Page Load handler):
HtmlForm frm = (HtmlForm)Master.FindControl("form1");
frm.DefaultButton = sendButton.UniqueID;
Thank you, 'S'. You are right.
[Adrián Córdoba]
|
|
|
|
|
Here is what i have
< UpdatePanel >
<dynamically added="" user="" control="">
< UpdatePanel >
all updatepanels are set to conditional
For some reason when i click the button the button click event does not fire. Thank you ahead of time for your healp.
|
|
|
|
|
From where I can Start to Learn .Net 3.0?
|
|
|
|
|
English tourist to local Irishman: Excuse me my good man, how do I get to Dublin from here?
Irishman to English tourist: Oh, if I was you, I wouldn't start from here!
|
|
|
|
|
Hi
I just installed VS2008, im having problems with the design and source view
I opened a web project i had developed in VS2005
When trying to modify the text on the page and then changed to source view, i noticed that the text had been changed (a part was lost and oter part was moved), also something weird happen to an html image that i had inside a hyperlink control
This page is using a masterpage, i also noticed how the layout f the masterpage was changing, this is really weird since one cant change the layout of the masterpage from the contentpage (in design)
Has anyone else have any problems or weird behavior??
My version is: 9.0.21022.8 RTM
Trial version
Thanks in advance for any comments
Alexei Rodriguez
|
|
|
|
|
hi
i am using asp.net and on linkbutton click i call a javascript to open abc.aspx page in new window and in this form i add data from mydatabase and then i say response.redirect after adding record in database but page is open in new page.
while i want to show only one message after add data in database datasuccessfully added and after that window will closed?
please solve my problem
I will do my best?
Integrated Solutions, Bikaner (Raj.), India
|
|
|
|
|
Page.RegisterStartupScript("myrest", "alert('Hello');");
use this after record insertion.
your's subbu
|
|
|
|
|
include the below code in ur head tag
<base target="_self" />
If U Get Errors U Will Learn
If U Don't Get Errors U Have Learnt
|
|
|
|
|
While Reading 1005 records from Excel2000 through asp.net,c# application. inside the application two sp are called for 1005 times.
I get the following errors "SQL Server does not exist or access denied ,ConnectionOpen (Connect()).".
While reading 850 records from excel 2000 it's working fine and two sp are called 850 times.
Thanks in Advance
Senthilkumar.T
|
|
|
|
|
Are you trying to open new connection every time you read a row in excel. if yes try opening single connection at first and use the connection everywhere.
Venky
|
|
|
|
|
On my page i've a gridview, in that i've 3 template columns and in each template column i've a checkbox. If the user wants to select morethan one check box in a row, the previously checked check box should be unchecked.
Is there any solution like; If we use radio buttons in place of check boxes we can set Groupname property.But when we use checkbox is there any property like that? If not how we can achieve this functionality.
Plz excuse me if any gramitical mistakes.
Thanks in advance.
My Mail id avidadi2002@gmail.com
|
|
|
|
|
Write a javascript function and put code in code behind to call the method. I didn't try this code, I'm just giving you and idea off the top of my head on how to do it. I'm not going to take the time to get it all working but just so you get the idea of how to do it.
<br />
javascript EG<br />
<br />
fucntion uncheckBoxes(value, id1, id2)<br />
{<br />
if (value)<br />
{<br />
document.getElementById(id1).checked = false;<br />
document.getElementById(id2).checked = false;<br />
}<br />
}<br />
<br />
<br />
protected void gridRowBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e)<br />
{<br />
<br />
<br />
if (e.Row.RowType == DataControlRowType.DataRow)<br />
{<br />
Checkbox1 = (Checkbox)e.Row.FindContrl("cb1");<br />
Checkbox2 = (Checkbox)e.Row.FindContrl("cb2");<br />
Checkbox3 = (Checkbox)e.Row.FindContrl("cb3");<br />
<br />
CheckBox1.attributes.add(onclick, "uncheckBoxes(this.value, '" + Checkbox2.clientId + "', "' + Checkbox3.clientId + "');";<br />
<br />
}<br />
}<br />
<br />
<br />
I didn't get any requirements for the signature
|
|
|
|
|
Thankyou very much Mr.ToddHileHoffer. This working fine.
|
|
|
|
|
Instead of adding 3 columns with 1 checkbox each, add one column with a radiobuttonlist containing the options of the 3 columns with the checkboxes
Alexei Rodriguez
|
|
|
|
|
Hi,
Can abyone knows how to do custom pagination in datalist with out using viewstate.
asp.net 2.0 and c#
Regards
Subash
Subash
|
|
|
|