|
As CG said .
What Do You Mean By Not Working..!
How It is Not Working..!
If You Explain May the Group will Help..
1
If It Helps Click It as Answer
|
|
|
|
|
1. Used ASP.NET controls: dropdown and textbox.
2. For the 1st time at page load, some default values should be populated in dropdown and 1st value in text box.
Written the below code
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DropDownList1.Items.Add("a");
DropDownList1.Items.Add("b");
DropDownList1.Items.Add("c");
TextBox1.Text = DropDownList1.SelectedValue;
}
}
3. Set the autopostback of dropdown=False. So "DropDownList1_SelectedIndexChanged1" will not work. I have done this because after selecting any value in dropdown, post back should not take place.
4. Now we have values in drop down. I want to select a value in dropdown and same selected value should be visible in text box.
I want a java script for this. Not able to write it as not able to find any client event for dropdown.
Actually there is event "onclientclick" for an asp.net button control, but did not find any such event for dropdown.
So how to write java script code.
|
|
|
|
|
BY using ajax, you can get the result.Why dont you try ajax
|
|
|
|
|
Perhaps he cares about writing efficient code that is scalable ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi
I'm using Calendar.setup to get date in textbox by selecting from calandar in asp.net.
but first time always after loading page it needs to be clicked twice.
but I want calandar on single click on image button.
please find code here:
function showcalander(obj,date)
{
Calendar.setup({
inputField : date, // id of the input field
ifFormat : "%d/%m/%Y", // format of the input field (even if hidden, this format will be honored)
button : obj, // trigger button (well, IMG in our case)
align : "Br", // alignment (defaults to "Bl")
singleClick : true,
: false
});
}
|
|
|
|
|
I think Its Ok With Using .Did U Use For Button Click Like This
<img src="../Img/cal.gif" id="f_triggerDOB_b" onmousedown="initCalc('f_dateDOB_b','f_triggerDOB_b');" />
function initCalc(inputfield,button){
Calendar.setup({
inputField : inputfield,
ifFormat : "%m/%d/%Y %I:%M %p",
showsTime : true,
button : button,
singleClick : true,
step : 1
});
}
But If You r using ajax why to use Third party Control.Did You lokk at this..!
http://www.asp.net/AJAX/AjaxControlToolkit/Samples/Calendar/Calendar.aspx[^]
If It Helps Click It as Answer
|
|
|
|
|
Hi
I wnat to store connection string in different web.config files and those are in diff drives.
how can i find the path of web config file
and may be the locations will be change at deploy machine.
how can i store it.
plz give a solution ASAP.
thanks in advance.
|
|
|
|
|
|
Thanks for reply
Is it possible server.mappath in vb.net 2003.
and
can u give sample code to store and retrive from web.config
here the machines are different.
iam storing from ui page and those values will be stored in more than one web config file in an encripted format.
plzzz help...
|
|
|
|
|
|
here
one web.config file is in one system and another web.config is in another system(PC)
both are having same platform and everything same. those are deploy machines
|
|
|
|
|
what you mean they are in different drives? they can be in sub folder of root. And why you want to get the path for web.config which are in sub-folder?
|
|
|
|
|
hi,
i want to add menustrip tool in master-page in asp.net web application.plzz help me out.
|
|
|
|
|
|
First read the guide on how to ask questions. Then read a book on ASP.NET. Or two. Then perhaps you'll be ready to start writing some basic projects, although you'll be a long way from anything that anyone would pay for.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
how can find out substring in a string
|
|
|
|
|
|
|
No need to ask google..even VS Studio IDE will answer your question....
use- string.Substring() method
|
|
|
|
|
If this is the level of your knowledge, you should give up on this forum, and read a book, probably a dummies level book, so you have some sort of basic clue about what you're doing.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
is it possible to put tabs in down position(at the position of footer) in ajax tab......plz guide me a bit..............
|
|
|
|
|
|
I am opening an panel when i click newuser linkbuttton. Panel consists of 4 diff. radiobuttons
wen i select an radio button option..it should navigate to new page
<asp:LinkButton ID="linkNewUser" runat="server" style="z-index: 1; left: 42px; top: 170px; position: absolute; height: 21px; width: 76px">NewUser</asp:LinkButton>
<asp:Panel ID="panelSelection" runat="server" CssClass="modalPopup" style="display: none" >
<asp:RadioButtonList ID="RadioButtonList1" runat="server" >
<asp:ListItem Value="0">Patient</asp:ListItem>
<asp:ListItem Value="1">Doctor</asp:ListItem>
<asp:ListItem Value="2">Pharmacy</asp:ListItem>
<asp:ListItem Value="3">Lab</asp:ListItem>
</asp:RadioButtonList><br />
<p style="text-align: center;">
<asp:Button ID="OkButton" runat="server" Text="OK" OnClick="OkButton_Click" />
<asp:Button ID="CancelButton" runat="server" Text="Cancel"/>
</p>
</asp:Panel>
<ajaxToolKit:ModalPopupExtender ID="linkNewUser_ModalPopupExtender" runat="server"
TargetControlID="linkNewUser"
PopupControlID="panelSelection"
BackgroundCssClass="modalBackground"
OkControlID="OkButton"
CancelControlID="CancelButton"
DropShadow="true">
</ajaxToolKit:ModalPopupExtender>
protected void OkButton_Click(object sender, EventArgs e)
{
if (RadioButtonList1.SelectedItem.Text=="Patient")
{
Response.Redirect("~/PatientRegDetails.aspx");
}
else if (RadioButtonList1.SelectedValue=="1")
{
//this has to be closed
}
}
Here OKButton_Click event is not fired.
|
|
|
|
|
I think OKControlId Property of ModalPopup Control Extender and onClick of the Ok Button is in conflict. When you specify the OkControlId of ModalPopupExtender then it won't execute the button OnClick Event. So just remove the OkControlId property of ModalPopupExtender.
|
|
|
|
|
I have removed it and tried but still the OKButton_Click is not fired
|
|
|
|