|
Dont come here asking for chunks of code you will only get abuse
|
|
|
|
|
I have a customvalidator for textbox' in a gridview. The problem is, it doesn't fire up. I did put a break point to validation method but it never catches. The code is working fine in a single page with a single textbox but not in a GridView Can you please tell me what's wrong? Here's my code:
<asp:Content>
<script language="c#" runat="server">
private void NumericControl(object sender, ServerValidateEventArgs args)
{
if (Tools.IsNumeric(args.Value))
args.IsValid = true;
else
args.IsValid = false;
}
</script>
<asp:GridView>
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:TextBox ID="txtValue" runat="server" Width="50" /><br />
<asp:CustomValidator ControlToValidate="txtValue"
EnableClientScript="true"
ClientValidationFunction="NumericControl"
ErrorMessage="Not numeric"
OnServerValidate="NumericControl"
runat="server"
ValidationGroup="Kontor"
Display="Dynamic"
/>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</asp:Content>
|
|
|
|
|
Check if your button has CausesValidation = true and the ValidationGroup = "Kontor";
And Set the ValidationGroup="Kontor" for the TextBox
EG
<asp:textbox id="txtValue" runat="server" width="50" validationgroup="Kontor" xmlns:asp="#unknown" />
|
|
|
|
|
I did. I added ValidationGroup to textbox and ValidationGroup and CausesValidation to button. Nothing changed. Thanks for the advice though..
|
|
|
|
|
|
|
Problem because the gridview is generated at runtime therefore control validate has to.. maybe
|
|
|
|
|
HI,
I was trying to apply styles like width height and border for dropdownlist control in asp.net using CSS. It works fine in Mozilla but for ie 7 its not working. Can anybody help me .Any workarouns for this
Thanx in advance
|
|
|
|
|
hai
i think it is the problem of IE 7 i have also faced this problem so use earlier version
|
|
|
|
|
hi
every one
i am trying to make website setup.
but in add project output group
wimdow i am able to see only content file
option other options are not visible to
me.
how i can make webset up .
so that i can access it to other
computer.
thanks..gaurav
|
|
|
|
|
Sorry if this annoys anyone, but I'm only looking for rough ideas, not a whole solution, and my prior thread on the subject[^] has fallen off the map with no replies at all.
|
|
|
|
|
|
Please dont start your posts with urgent.
I think you need IIS to do it
|
|
|
|
|
|
You need to read up on "mock objects".
|
|
|
|
|
Don't use words like urgent in your subject line. It is rude, and I'll just ignore your inquiry.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
You need to abstract HttpContext calls behind an interface and mock that interface while testing. BTW, before you ask next question, please read this[^]
|
|
|
|
|
|
Neeraj Saluja wrote: But trust me its really urgent
Trust me that it is no one else's problem but yours. This site doesn't revolve around people's urgency.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hai all,
i had one textbox in datalist which has value from database.
i need to not able to change the text which is in (datalist)textbox.
can some suggestion..pls
Thanks in advance...
Thanks
Subbu.
|
|
|
|
|
sorry but your question is not must understandable but wat i understand is :
You can set the textbox enable property to false. so no one can change the value
|
|
|
|
|
Make that TextBox Read only or show the text in Label instead of TextBox
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
hai
i think that text box is in readonly mode or it will be diasbled pls check the properties of that textbox
|
|
|
|
|
i have to create college timetable and want to display like this
Time Slot | 08-10 | 11-01 | 02-04 |
----------------------------------------------------
Monday | prof1/phy | prof2/math | prof3/lang
----------------------------------------------------
Tuesday | prof4/com | prof .........................
can any1 help how should i design database and how to display timetable in asp.net like this ???
thanks in advance.
|
|
|
|
|
Use DataList control for showing the Data
Make a call to to database run the store procedure/Query
get result into DataSet bind this Data to DataList
Now to create ItemTemplate for DataList Take help from Google
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|