|
In the OnClock event, just create your connection, query, etc.
|
|
|
|
|
hi to all
i have a dropdownlist on page try to validate through RequiredfieldValidater BUT it is not working.
i think the possible error in Initial value property of required field validator..
plz. help me how to implement validation on dropdownlist and sent some sample code if possble
thanks
john
|
|
|
|
|
can you specify what exactly you want to validate..?
pradip kishore
|
|
|
|
|
I have used a RequiredFieldValidator for dropdown lists loads of times. The only thing to remember is to set InitialValue to whatever the value of your "Please Select" entry is.
|
|
|
|
|
Hi!
What I did in my project is that, I inserted a new Listitem at index 0 of my dropdownlist with, say, value of "-1".
then I added a CompareValidator control with properties:
Type="String";
ControlToValidate="MyDropdownList";
ValueToCompare="-1"
Operator="NotEqual";
coded like ->
<asp:DropDownList ID="MyDropdownList" runat="server">
<asp:ListItem Text="Please Select" Value="-1"></asp:ListItem>
<asp:ListItem Text="ListItem1" Value="Value1"></asp:ListItem>
<asp:ListItem Text="ListItem2" Value="Value2"></asp:ListItem>
</asp:DropDownList>
<asp:CompareValidator Type="String" ControlToValidate="MyDropdownList" ValueToCompare="-1" Operator="NotEqual" ID="CompareValidator7" Text="*" Display="dynamic" runat="server"></asp:CompareValidator>
Note that the ValueToCompare's value is the same as the ListItem value I added to my dropdownlist, and the Operator is "NotEqual".
hope it helps..
//mastereuo
On Error Goto Hell
|
|
|
|
|
How is this any different to using a requiredFieldValidator and setting the InitialValue to -1 (in your example)
|
|
|
|
|
i set initialvalue to -1 then, it is also not working???????
|
|
|
|
|
This my solution, you must to create a dropdownlist with only one item, the text is '-' y el value is the same...
So, insert a COMPAREVALIDATOR and make this changes
ControltoValidate: the dropdownlist
Operator: Not Equal
ValuetoCompare: - (Its the line)
Thats all, the validator fireup if you choose the line value
Best regards
keep Learning and you never will be out of date...
|
|
|
|
|
In my Main page,
<asp:TextBox ID="txtDate" runat="server"></asp:TextBox>
<A href="javascript:GetDate('txtDate.ClientID')">View Calendar</A></td>
Here, I am passing the ClientID of the TextBox control in GetDate() method.
JavaScript Code:
function GetDate(CtrlName)
{
ChildWindow = window.open("MyCalendar.aspx?CtrlName=" + CtrlName, "PopUpCalendar", "width=270,height=270,top=200,left=200,toolbars=no,scrollbars=no,status=no,resizable=no");
}
In my Calendar Page (Popup), I have used the below function to return the date.
private void ReturnDate()
{
String returnScript = "";
returnScript += "<script language=javascript>";
returnScript += "window.opener.getElementById('";
returnScript += Request.QueryString["CtrlName"];
returnScript += "').value = '";
returnScript += strSelectedDate;
returnScript += "';window.close();";
returnScript += "<" + "/" + "script>";
ClientScript.RegisterStartupScript(this.GetType(), "", returnScript);
}
returnScript Output (while running):
"<script language=javascript>window.opener.getElementById('txtDate.ClientID').value = '01/31/2007';window.close();</script>"
My motto is to assign the Date Value in the TextBox of in my Main Page.
How can I solve this? Pls help me.
Regards,
Jay
|
|
|
|
|
Hi,
I have chenged below 2 lines of code, to work properly.
<A href="javascript:GetDate('<%=txtDate.ClientID%>')">View Calendar</A>
returnScript += "window.opener.document.getElementById('";
Now, It works fine
Regards,
Jay
|
|
|
|
|
Dear All,
i am bit new to the dotnet world. i am making web application using asp.net ,C# (Visual studio 2005).i have login form where i wanted to use member class facility ( so as to minimize coding and increase efficieny).
i have user table(usermst) where i am storing userid , user password and other detail.
My Question is
Is it possible for me to use member class with my database only ?
if yes please provide me some link or some example( iam already searching but till now not get sufficiet info.)
please guide me
thanks
regards
imran khan
|
|
|
|
|
I have no idea what you're talking about ?
By member class, do you mean a class in your app_code section ? You should have at a minimum, a class whose sole job is to handle database access, and a class which represents a user, and knows how to load/save itself using the data layer.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hi
Am using a Datagrid with 5 columns
Name,Address,City,Country and Phone Number.
And i have set the width of the Grid.
The problem is, when the Address field retreives a lengthier row, the width of the Grid also expands,even though i have set its width and in Property Builder --> Format --> Items also i have Checked 'Wrap text within cell' checkbox.
I dont want my Datagrid to grow in width though the fields have lengthier data,they need to be wrapped inside the cell itself.
Please help me to do this...
Thanx in advance
-- modified at 3:49 Thursday 18th January, 2007
|
|
|
|
|
haven't you tried to set the HeaderStyle-Width property of your BoundField columns to your desired width?
like ->
<asp:BoundField DataField="Name" HeaderText="Name" HeaderStyle-Width="20%" />
//mastereuo
On Error GoTo Hell
|
|
|
|
|
Ya...i have tried that
here it is:
asp:BoundColumn DataField="Address" HeaderText="Contact"
HeaderStyle-Width="30%">
But in vain...anyother alternatives?
|
|
|
|
|
I tried to use <menu> in html but it won't works with updated versions.plz provide me any javascript/asp.net code to implement a side menu with submenu options.
With Thanks & Regards
Amit Sk Sharma
|
|
|
|
|
You need to check the option to not render tags for your code to be visible.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
hi
check out http://javascript.internet.com/
and goto menu option.
just add the script on html page in asp.net
bye
|
|
|
|
|
I am using a user control with hyperlinks as a side menu. i need to popup a table or div (or another user control)with sub options of a option. plz tell me the way to popup a or on mouseover having active links
-- modified at 1:34 Thursday 18th January, 2007
With Thanks & Regards
Amit Sk Sharma
|
|
|
|
|
Hi
i have created a web deployment project (wdproj file). But now i don't know what to do with it. I mean i don't know how to use that file, i don't know where to place it so that i can start working. My web application is written in asp.net 2.0. Can someone help me regarding this please.
Regards
sAqIb
"Our scientific power has outrun our spiritual power. We have guided missiles and misguided men."
Dr. Martin Luther King Jr.
|
|
|
|
|
Hi, i want to resize the image in asp.net.im using upload control.whicle clicking upload button,it shud
compress the image to 750 kb if its size is mmore than that.how do i do this.
regards,
tasnim
|
|
|
|
|
Hi,
I made a test.ASPX and usercotrol.ascx. On usercotrol.ascx , I placed three web control like btnsave, btndelete and btnedit.
Now I would like to print all web control Id like
Btnsave, btndelete, btnedit on a test.ASPX.
Any help is appreciated.
Regards,
Rajesh
rajesh
|
|
|
|
|
maybe you can see the html source code and find out the control's ID
|
|
|
|
|
foreach (Control ctrl in YourControlName.Controls)
{
Response.Write(ctrl.ID+ "||");
}
|
|
|
|
|
I have a very small site where I want to have a section of the page be editable by the user. The requirement is that the user could edit a file on a share, save it and the content would show up.
I thought about creating an XML document and have a link and text nodes. I would suck this into the application and display it. Is this a bad approach? Is there an easier way to do this? The content won't hold anything but links and text. Thanks.
|
|
|
|