|
Hi Sonia,
Looking at u r quarries I suggest you to visit this following site
"www.javascripter.net" just navigate FAQ section of this site u will get solution for u r quarries.
Regards,
S.Arif patel
|
|
|
|
|
Sonia Gupta wrote: selected-index
ddl.options.selectedIndex
Sonia Gupta wrote: selected value
var month=ddl.options.selectedIndex;
Sonia Gupta wrote: items.count
dd.items.Length
bEst rEgard
pAthan
please don't forget to vote on the post that helped you.
|
|
|
|
|
To create a select menu like dropdownlist(select)
you can use the following code:
Select a page
JavaScript
Numbers
Strings
Navigation
Colors
JavaScripter.net
Just change the menu items and the corresponding URLs to whatever you want. You can use absolute URLs (like http://www.javascripter.net) as well as relative URLs (like mypage.htm).
Regards,
S.Arif patel
Mind Source Pvt Ltd.
|
|
|
|
|
i am having the appostophie character in the textbox .i need to do the client side validation.how should i check the substring in the textbox. i mean , it the textbox contains that character.hpw i should validate this thing
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Sonia Gupta wrote: hpw i should validate this thing
Use any client-side scripting language(Javascript or VB script ). Alternate Use RegularExpression Validation Control .
Regards - J O H N -
|
|
|
|
|
Hi Sonia,
You can use Custom Validator control.
let you have a textbox Textbox1 and Drag a CustomValidator Control
in CustomValidator Set ControlToValidate=Textbox1
use this method to check the validation under this control.
Thaks !
|
|
|
|
|
You can split value with appostophie character in javascript.
get itExample
or
if you want substring of value then get it Example
bEst rEgard
pAthan
please don't forget to vote on the post that helped you.
|
|
|
|
|
Make autopostback=true of drop down list. This will post the page when drop down list changes. Handle it's selectedindexchanged event, and bind the gridview here with the required values.
|
|
|
|
|
i have a button and a textbox control.I am executing a chunk of code , on the button click event, there in the button click event,i am validating the textbox(whether the textbox is having some value or not).i wanted to do the validations at the client end.i mean first i want to validate the textbox in the javascript , if it is having some value , only then the code behind code should execute.How should i do it.Main thing is i want to execute the code behind file code , if the textbox is having some value , otherwise , the postback should not happen.
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Sonia Gupta wrote: i wanted to do the validations at the client end.i mean first i want to validate the textbox in the javascript , if it is having some value , only then the code behind code should execute.How should i do it
Assume your button is button1. So in page load event, write something like
button1.Attributes.Add("OnClick","return MyJSFunc();");
This will add the Onclick attribute to the button. Now inside the MyJSFunc() , get textbox element and check the value. If value is ok, return true else return false .
function MyJSFunc()
{
var TxtBox = document.getElementById("YourTextboxId");
if(TxtBox.value == "")
{
alert("Enter value");
return false;
}
else
return true;
}
These are the basic things, and I recommend you to buy a book and learn how things are working.
|
|
|
|
|
How to make an array of buttons so that whenever i click any of my buttons i should get it's text ??????????????
pls reply as soon as possible...bcos i m new in asp.net and i got stuck in my project
|
|
|
|
|
but why you want to create an array?
I did give an example yesterday.
can you tell me whats your exact problem?
bEst rEgard
pAthan
|
|
|
|
|
exactly i want to create a calculator..for that i have to check whether a button clicked is digit/opeerator/other..for that if i take simple buttons then i have to ckeck for each buttons..instead i want to do like that if i press any button then i should get it's text i.e. whether it is digit/operator/other????????
|
|
|
|
|
I did give you an example.
cosider you have four button for "+" ,"=","1" and "2"
html source code
asp:button id"btnplus" runat="server" onclick="calendar_click" Text="+" />
asp:button id"btnequal" runat="server" onclick="calendar_click" Text="=" />
asp:button id"btnone" runat="server" onclick="calendar_click" Text="1" />
asp:button id"btntwo" runat="server" onclick="calendar_click" Text="2" />
global val
int prevVal,CurrVal;
event
protected void calendar_click(object sender,....)
{
string key=((Button)Sender).Text;
switch(key)
case "+":
preVal=int.Parse(txtVal.Text);
txtVal.Text="";
break;
case "=":
currVal=int.Parse(txtVal.Text);
txtVal.Text=preval+currVal;
break;
case "1":
txtVal.Text=key;
break;
case "2":
txtVal.Text=key;
break;
}
bEst rEgard
pAthan
please don't forget to vote on the post that helped you.
|
|
|
|
|
ajsgja wrote: How to make an array of buttons
You can't make array of buttons. I think you are from VB background, and talking about control array, it's not possible here with C#
-- modified at 3:40 Saturday 27th October, 2007
|
|
|
|
|
ok so how can i do it here.....control array..is there any other way to do it here
|
|
|
|
|
N a v a n e e t h wrote: You can't make array of buttons
Button[] buttonArray = new Button[5];
|
|
|
|
|
|
i want to do it in asp.net..is it possible
|
|
|
|
|
it's possible in ASP.NET. Place a Container Control(placeholder) in your ASPX Page, Create the number of Button Control's dynamically and Add each control to the placeholder's Control Collection and set the Properties. This code has to be written on the OnInit of the Form to make the dynamical control participate in the viewstate. I tested. It work's perfect in my system. try it out...
-- modified at 5:17 Saturday 27th October, 2007
Regards - J O H N -
|
|
|
|
|
Hi Friends,
I need an exapmple for calendar contol using Asp.net.
Please help me.
|
|
|
|
|
In asp.net calender control tool is there...,
Y u cant use that?,
Or u need calender control like pop up?,
If U Like My Post Rate This MSG
Regards,
Magi
|
|
|
|
|
Thanks for your replay.
I used DTpicker control to display the clender and which is not displayed correctly on my page.Because the contol like Dropdowndown box hides the calendar.I couldn't see the calendar well on my page.
So i need to use Asp:Calendar control which should display the calendar well on my page.
Please reply friend.
|
|
|
|
|
|
Thanks for your replay.
I used DTpicker control to display the clender and which is not displayed correctly on my page.Because the contol like Dropdowndown box hides the calendar.I couldn't see the calendar well on my page.
So i need to use Asp:Calendar control which should display the calendar well on my page.
Please reply and give me good example.
|
|
|
|