|
i'm not fully understand what your problem is.
do you want to assign your each ddl's text or item?
if item, you have to bind your ddl first with data, set selectedvalue and selectedtext then bind it.
ddl.datasource = bla2
ddl.selectedvalue = bla2
ddl.selectedtext = bla2
ddl.databind()
then select ddl.selectedvalue with your specific item.
be careful if you want to assign with something that "by reference".
sometimes if you don't assign it correctly, the result will goes like your problem like now.
hope it helps
|
|
|
|
|
Hi thanks for you help,
Sorry should have mentioned this initially.
My ddl's has items already in its collection,
namely Harry, George. which are static
i am reading and storing data into the datatable dt, which has 2 columns - Consultant1 and Consultant2.
the problem i am experiencing is that when i assign ddl1 its value(Consultant1) and go to ddl2 and assign its value(Consultant2), ddl1 some how also gets assigned ddl2 value.
ddl1 loses it value of harry and picks up George.......
i have noe clue why...
hope this helps....
|
|
|
|
|
hello anoop,
i'm sorry due to late to reply, because yesterday was chineses new year holiday.
with how you assign the value of ddl?
is it with ddl.selectedvalue ?
if it doesnt work until you want to punch your monitor, why dont you fill you ddl's item dynamiclly?
ddl.item.clear()
ddl.item.add(new listitem("text","value"));
hope it helps..
im sorry if im too late
|
|
|
|
|
how to bind datafield in gridview
which is invisible in gridview.
like-
I'm taking 3 fields in gridview:
RestID, RestName, Description
but Description will be visible="false"
I want to take all value from 3 fields in text boxes.
thanks
You get the best out of others when you give the best of yourself.
|
|
|
|
|
From Aspx page you can do that
|
|
|
|
|
something that change in gridview, you can assign value directly to boundfield and set the boundfield.visible = false then you want to catch that value. well, it happened while i was at project.
you have to put a control to templatefield (in this case hiddenfield is great), assign it with data like example below.
when you want to get the value, you have to use FindControl method, catch the control, get the value.
ex:
'<%#DataBinder.Eval(Container.DataItem, "PolicyNo")%>'
hope it helps
tell me if my writing's confusing
|
|
|
|
|
Hi All,
I am trying to open connection to Sql database server through an ASP.net application using an Ip address.
connstrr="Data Source=111.11.111.20;Initial Catalog=TestData;User ID=Testdate;Password=Test"
I get the following error on my ASP.net code Connection.open() line..
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Can any one advice me what is the problem?
Thank you
|
|
|
|
|
kibromg wrote: connstrr="Data Source=111.11.111.20;Initial Catalog=TestData;User ID=Testdate;Password=Test"
Are you accessing local system or any remotes system server ?
What is the SQL Server version ? is it SQL Server EXpress Edition ?
|
|
|
|
|
Thank you for your response.
I am using SQL2005 and accessing it remote server.
Thank you
|
|
|
|
|
is it SQL SERVER Express Edition ?
|
|
|
|
|
Thank you onec again.Its not Express edition.
|
|
|
|
|
|
This is a very common error. By default SS2005 does not permit remote connections. A quick google of this error should provide some guides as to how to use the surface area configuration stuff.
|
|
|
|
|
|
hi;
i have adrotator control in my webpage,
i want to update the images in regular intervels without using timer control.
i want pictures to be changed in regular intervels without refreshing the page.
how to do this?
i dont want to use update panel and timer control too.
is it possible to change the pictures in regular intervels without refreshing the page.
The most difficult phase of life is not when no one understands you ; It is when you don’t understand yourself.
|
|
|
|
|
hi,
i also want to do the same thing.
have you got any solution??
Thanks
Pragnesh
Pragnesh Patel
|
|
|
|
|
function ChangePage(id)
{
// save the page clicked
document.all.PageNumber.value = id;
// call the __doPostBack function to post back the form and execute the //PageClick event
__doPostBack('PageClick','');
}
document.all.PageNumber.value = id; code is not working.
How to assign id into document.all.PageNumber.value
thanks in advance.
You get the best out of others when you give the best of yourself.
|
|
|
|
|
Dear Friends,
I want an popup window which will received the selected data from backend table as per the request using javascript.
For example:
One train have multiple station so if i will provide the train name from the operer form it will show me the list of station where the train stop on another popup form using javascript.
please help me thanks in advanced
Sasmi
Sasmi
|
|
|
|
|
hi
you can use the query strings
like
trainname.aspx?mumbaiexpress
and take the value of query string on pop up form
and show the respective value
|
|
|
|
|
hello every body
i have a datagrid which is inside an Update panel, which contains a Dropdownlist with options "YES" and "No". on the Other End i have 2 panels namely p1 and p2 which is outside the UpdatePanel
where p1 and p2 on form load visiblibity is set to False
now my intention is to make p2 visbile=true on selecting the Dropdownlist which is inside the Datagrid
Ex
if dropdownlist ="YES" then
p1.visible=true
else
p2.visible= false
Thanks in Advance
DevKranth
|
|
|
|
|
hi
write the bubble event
means write one protected functions like
protected void visiblePanel(object sender, EventArgs e)
{
if dropdownlist ="YES" then
p1.visible=true
else
p2.visible= false
}
in html
set autopostback of drp to true
and set the on OnSelectedIndexChanged = visiblePanel
|
|
|
|
|
hi laxmikant
thanks for the response ... as u said i did the Same but the problem is when i debug the code the panels state are changing but it is not reflected in the Form...
|
|
|
|
|
In this case, you can use another Updatepanel to place those P1 and P2 in that Updatepanel. If not possible, then you can use javacript by registering it with Scriptmanager.registerClientScriptblock.
I think one of the above method solve your problem.
Regards,
Amar Gujarathi
cfoamar23@gmail.com
|
|
|
|
|
hi amar
thanks for u response.i think the first Case u said is not going to happen coz when i add an update panel to the P1 and p2 it gives me a message saying u have to add another Update panel
the second option i am not clear can u briefly explain me..
|
|
|
|
|
hi devkranth,
For that you have to use javascript, first you need to find out the P1 and P2 id of the panel using javascript
eg.
function switchpanel(panelno)
{
var p1=document.getElementById("P1"); //find out P1 with its client ID
var p2=document.getElementById("P1"); //find out P2 with its client ID
if (panelno==1)
{
p1.style.display="block";
p2.style.display="none";
}
else
{
p1.style.display="none";
p2.style.display="block";
}
call this script on dropdown_change event with scriptmanager as previously mentioned.
}
|
|
|
|