|
You could have two images buttons and then use them like following:
if (imagebutton.enabled == false)
{
Imagebutton1.visible = true
}
else
{
Imagebutton2.visible = true
}
|
|
|
|
|
That's unnecessarily complicated, as simple as it is. For now I just use two images, one green and one grey. I was curious as to there being a more elegant solution, but the only candidate there is a control derived from ImageButton that has two ImageUrl properties, and renders the appropriate one depending on its Enabled property.
|
|
|
|
|
Hi All,
I'm using two dropdownlists in page1 and depending upon dropdown1 selection I'm filling the dropdown2 using Ajax. After that I will add some more data to dropdown2 using page2.If I come to page 1 and select dropdown1 selection it is filling only the old data not the updated one.
It is filling data only once,2nd time if I select same option it is not going to the codebehind of my breakpoint..May i know the reason for this?
May i know where I have done wrong? How to resolve this now?
Thanks in Advance,
Raja Raman S
Meeram395
|
|
|
|
|
Are you filling dropdown from DB or Static Values.
Please post your code for proper answer.
Best Regards,
Chetan Patel
|
|
|
|
|
Hi,
I'm filling the dropdown from DB. Please find below the code:
function AnalystKeyChange()
{
var tlList = document.getElementById("ddldataset");
//Getting the selected country from country combo box.
var SelectedAnalyst =tlList.value;
// URL to get states for a given country
var requestUrl = AjaxServerPageName + "?Selectedtxt=" + SelectedAnalyst;
CreateXmlHttp();
// If browser supports XMLHTTPRequest object
if(XmlHttp)
{
//Setting the event handler for the response
XmlHttp.onreadystatechange = HandleResponse3;
//Initializes the request object with GET (METHOD of posting),
//Request URL and sets the request as asynchronous.
XmlHttp.open("GET", requestUrl, true);
//Sends the request to server
XmlHttp.send(null);
}
}
//Called when response comes back from server
function HandleResponse3()
{
// To make sure receiving response data from server is completed
if(XmlHttp.readyState == 4)
{
// To make sure valid response is received from the server, 200 means response received is OK
if(XmlHttp.status == 200)
{
analystListItems(XmlHttp.responseXML.documentElement);
}
else
{
alert("There was a problem retrieving data from the server." );
}
}
}
function analystListItems(alNode)
{
var analystList = document.getElementById("ddlAnalystReportTo");
//Clears the state combo box contents.
for (var count = analystList.options.length-1; count >-1; count--)
{
analystList.options[count] = null;
}
var analystNodes = alNode.getElementsByTagName('analyst');
var textValue;
var optionItem;
//Add new states list to the state combo box.
for (var count = 0; count < analystNodes.length; count++)
{
textValue = GetInnerText(analystNodes[count]);
optionItem = new Option( textValue, textValue, false, false);
analystList.options[analystList.length] = optionItem;
}
}
Please let me if I have to proivde any more information. Thanks for all your help.
Meeram395
|
|
|
|
|
Hello all
I am developing a application in which user can purchase an
exam set. When he purchase it then he can take this exam at
any time. Every exam set include a set of 25 question and every
question having three default option.A,B,C.
I choose datagrid or datalist to display question ,their option
and provide paging to datagrid/datalist.On paging 2 i want to display
'FINISH TEST'(when he click on button he redirected to new page where
that user can see all test result and submit test) link or button which
is not displayed when user see first 13 question.How can i do this.
Please guide me to solve this.
Thanks.
Rahul.
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
So just to confirm you want to have a button at the end of your datagrid on the last page allowing the user to click and go to another page?
|
|
|
|
|
Yes
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
Not sure how to do this, you need to find a way of finding the last page or end row and then putting the button there
|
|
|
|
|
Ok thanks!
I will try it.
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
error : URI formats are not supported
strPath = "http://localhost/website/Hamdler.ashx?ImgNo=121"
Bitmap objImage = new Bitmap(strPath);
Best Regards,
Trishul Tandel
Software Developer
|
|
|
|
|
You can not pass Web Url in strPath,
You have to use local path.
Best Regards,
Chetan Patel
|
|
|
|
|
but how i handle that situation
Best Regards,
Trishul Tandel
Software Developer
|
|
|
|
|
Hi all,
My Application gives me an error of type "Cast from type 'DBNull' to type 'String' is not valid" when some value in the select statement is stored as "<null>" in the SQL Server 2000.
How could I return a "<null>" value from database, or is there a way to convert a value stored as "<null>" to any other value (example: zero or space)???
this is the sql statement in my web application:
Dim com As New SqlClient.SqlCommand
Dim ds As New DataSet
Dim da As New SqlClient.SqlDataAdapter("select X, Y, Z from hotels where X=" & Me.Xtxt.Text, con)
da.Fill(ds, "hot")
Note: This statement has no errors and works fine when no column in the database has a value "<NULL>".
Kind Regards
OBarahmeh
Palestinian Central Bureau of Statistics (PCBS)
Ramallah-Palestinian Territory
modified on Wednesday, March 12, 2008 9:39 AM
|
|
|
|
|
Yes there is ways of converting the data once it is brought back from the database using c# code.
Can you explain more?
|
|
|
|
|
I can 100% sure that the above doent produce any error. you may use some varriable to assing the returned value. There only you will get these error. Use Not .DBNull("ColumnName") function while assinging the value to a string
|
|
|
|
|
I have edited my question, could you please see my question again.
some of data in the SQL server 2000 has "<NULL>" value.
When I execute the above statements in the case there is "<NULL>" value in some field, then the above error happens: "Cast from type 'DBNull' to type 'String' is not valid"
Kind Regards
OBarahmeh
Palestinian Central Bureau of Statistics (PCBS)
Ramallah-Palestinian Territory
|
|
|
|
|
<b>a-+s-+p-+ wrote: Yes there is ways of converting the data once it is brought back from the database</b>
I want to convert the data (value), i.e: if the select statement return the value of some field as "<null>", I want to convert this value ("<null>") into zero.
could any one do this please?
Kind Regards
OBarahmeh
Palestinian Central Bureau of Statistics (PCBS)
Ramallah-Palestinian Territory </null></null>
|
|
|
|
|
You jus need an if statement saying
if(columns.value = null)
{
}
|
|
|
|
|
Could you please tell me how could I apply this to my statements:
Dim com As New SqlClient.SqlCommand
Dim ds As New DataSet
Dim da As New SqlClient.SqlDataAdapter("select X, Y, Z from hotels where X=" Me.Xtxt.Text, con)
da.Fill(ds, "hot")
Kind Regards
OBarahmeh
Palestinian Central Bureau of Statistics (PCBS)
Ramallah-Palestinian Territory
|
|
|
|
|
My web page contains an image button enclosed within div tag and a list box. On page refresh, a wait message will also be displyed. But during refresh, the list box flickers, its size gets changed and part of wait message window goes behind the list box. Could anyone please help on this?
|
|
|
|
|
you could try setting the focus on the listbox on the page load or
try this: VisibleDuringInit = false for the listbox
|
|
|
|
|
Hi All,
How to set colors of sidebar navigational links in wizard control dynamically
Regards,
Venkata
|
|
|
|
|
Hello Freind...
<!-- main calendar program -->
<SCRIPT src="js/calendar.js" type=text/javascript></SCRIPT>
<!-- language for the calendar -->
<SCRIPT src="js/calendar-en.js" type=text/javascript></SCRIPT>
<!-- the following script defines the Calendar.setup helper function -->
SCRIPT src="js/calendar-setup.js" type=text/javascript></SCRIPT>
<SCRIPT type=text/javascript>
Calendar.setup({
inputField : "StartDate", // id of the input field
ifFormat : "dd-mm-y", // format of the input field
button : "f_trigger_startdate", // trigger for the calendar (button ID)
align : "Bl" // alignment (defaults to "Bl")
singleClick : true
});
SCRIPT;
this code runs perfectally in simple page.. bUt its not run in content page when we use master page....
Please suggest me what will i do.....
|
|
|
|
|
ASP.NET prefixes the container id along with the control id. So when page is rendered, your controls id would be different. So always use ControlName.ClientId .
|
|
|
|