|
Dear Michael,
thanks a lot again for your kind reply.
Actually, I was confused and I thought, may be I could do something within my sourcecode which could check the NULL value for the databound property. Because, when I have a label's Text property bound to a SQL varchar(x) type and if the SQL contains NULL for that varchar(x), we dont get this "Unable to cast....." Exception, rather, the Label shows Empty String. Same thing like CheckBox. If I bind "Checked" property of a checkbox to a SQL bit type field, and if SQL contains NULL value for that bit field, we dont get Exception, rather we see unchecked state of the CheckBox. So, I thought, the control developer made some smart way to handle databound NULL values for the Label and CheckBox. If so, as a developer, I also could do something for my Byte[] property.
If it is really not possible to implement solution within my control, what workaround I can suggest my client to overcome this error ? Because it is very usual that, his or her SQL Database may contain NULL values for the VarBinary(x) field and he/she wont like to get error for that, so he/she would like to know from me about the workaround.
I appreciate your kind help. Thanks a lot.
Regards,
Nishat
|
|
|
|
|
Hi,
Did you ever find a solution to this problem? I'm struggling with the exact same issue.
Many thanks,
Andrew
|
|
|
|
|
Hello All,
Thanks for reading this. Here is my issue. I have a datagrid which needs to show 3 columns from my database stored procedure. Lets say the stored proc returns a dataset with 3 columns A,B,C. In my datagrid I want to show columns A and B and keep column C invisible. No big deal right ? Okay here is the tricky part. If value of the data row for column C="General" then i want to make the entire row color Red(or the text color to turn red preferably) for that record.If the value of column C="Personal" i want the rowtext to remain black..but now i want to show a "Delete" hyperlink there, lets say clicking on it makes it go to another page.The "delete" hyperlink should not appear when the column C value is "General". I know the "Delete" hyperlink we can add as a column which is not visible, but cannot seem to figure the mechanics of it. How do I go about it ? All help is greatly appreciated. Code samples much more appreciated !!!
Regards
RH
|
|
|
|
|
|
Hi,
I have been trying to change the active tab of a Asp.Net AJAX toolkit tab container all day and I haven't been able to do it. I am new to both asp.net and javascript. I have done a couple of searches but nothing.
Here is the javascript that I am calling from my asp.net button OnClientClick handler. OnClientClick="return SwitchTab('TabContainer1');"
function SwitchTab(TabID)
{
var MyTab = document.getElementById(TabID);
// MyTab.style.display = "none"; //this line worked
MyTab.setAttribute('ActiveTabIndex','0');
return false;
}
How can I access the active tab attribute?
Thanks
Ali
AliR.
Visual C++ MVP
|
|
|
|
|
I need to do a registration form for eucation classes, but some of the classes have concurrent sessions. I would like to use a RadioButtonList for each group, but would also like to be have to have a alt-type property or hover balloon to expand/collapse descriptions for each item within each radioButtonList. Anybody seen anything like that or am I just nuts?
Thanks, Janet
|
|
|
|
|
janetb99 wrote: have a alt-type property or hover balloon to expand/collapse descriptions for each item within each radioButtonList
I have not seen anything for RadioButtonList. But you can try this[^] article which explains how to do this for textbox. You can easily port this for RadiobuttonList.
Or are you planning to develop from scratch ? Then start with capturing MouseOver event using javascript. Create a div element and assign InnerText to div. Find the position of RadioButton and place your div near to that. This will work something like a tool tip.
|
|
|
|
|
1) What will the value of txt be after executing MyFunction?
public void Main()
{
string txt = MyFunction( “12345” );
}
public string MyFunction( string str )
{
if( str.Length == 1 )
return str;
else
return MyFunction(str.Substring(1, str.Length - 1)) + str.Substring(0,1);
}
Hint:
String.Substring( startIndex, length )
Ans54321.
seema
|
|
|
|
|
1 - do your own homework, that's what it's for
2 - don't spam the boards
3 - certainly don't post in the ASP.NET forum, with a question that has nothing to do with ASP.NET.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I am trying to determine if this can be done or not. My company would like to try to use .Net to set up a pager application. A user would list all their information, group they are in, application(s) they support etc. When someone needs to page a person on call they would logon to this application, select the person to page and it would send out a page.
Currently it is written in ASP.Net front end, and MVS back end using Cobol/DB2.
We would like to try to have this all on the .Net platform.
2 things that we need to work
1 - Send out pages to 1 or more at a time
2 - Automatic pages
a - if one group gets paged, automatically page another group
b - automaticaly page at a certain date/time
Can all of this be accomplished?
If so can you please get me started on where to look, code examples etc.
Thanks,
Mark
|
|
|
|
|
Your first step should be contacting your wireless service provider. You'll need to check with them on how to send a page. They may have a web service, or a website you can write an http request to. They'll also let you know if you can find out if a page was responded to.
As for paging at a certain date and time. You can do that in .net code, but not via a web application. You'll need to code a windows service or use a sql server job or something. But that is still easy enough to do.
I didn't get any requirements for the signature
|
|
|
|
|
Hi,
I have a Gridview. I am adding new row to Gridview with a button click which is outside gridview. User can add as many rows and I need to update all the rows with one button click. The user add row to gridview and enter some information in the new row and again when he adds new row the previously entered information is erasing. How to persist the gridview rows data.
Thanks
|
|
|
|
|
What you can do is store a dataTable in viewstate.
You can write code to update the dataTable from grid or add new rows to the table and rebind. Then iterate through the gidview to save to database.
If you need a code example I might be able to track it down for you.
I didn't get any requirements for the signature
|
|
|
|
|
Hi,
Thanks for your answer. I am storing the Data Table in Viewstate and adding the new row to Datatable. But I am not updating the Datatable. How to update the datatable.If you can Please provide me the example.
Thanks in advance
|
|
|
|
|
Hi,
I have a gridview which contains the one ID column the user enters a new row to Gridview he enter some value to the ID column. On the ID TextChanged event I have to check whether this ID is exist in the database table or not. I am able to check the entered id against database table value. But here my question is if the entered id value not exist in the database then I am returing some 999 value. Then I have to provide validation error messages like “the Entered id doesnot exist” How to provide this validation.
Thanks
|
|
|
|
|
Hi All,
Can anybody let me know as to how can one access the parent page controls (textbox control value in my case) from within an iframe. I need to access the textbox control value on the parent page, for some logic impementation in my iframe code behind (.cs ). Can somebody answer me quick.
Thanks in Advance,
Rana78
-- modified at 10:56 Monday 13th August, 2007
s k bhuyan
|
|
|
|
|
Use "top" keyword for accessing parent page.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Michael ,can u please elaborate a little more(how do i use this keyword) more over i'am trying to access the parent page from server side code and not client end javascript !
Thanks,
Rana
-- modified at 12:04 Monday 13th August, 2007
Rana78
|
|
|
|
|
AFAIK, you can't access the control of parent page from Code-behind. So, you have to use Javascript for accessing the parent page. After that, you have to look a tick to access this client-side value from Code-behind..
For example: There are one textbox called Textbox1 and IFRAME in Default.aspx. There is another page called Default2.aspx which suppose to be shown in IFRAME of Default.aspx page. We add one button called Button1 in Default2.aspx (ChildPage). We wanna get the value of Textbox1 that is placed in Default.aspx (parent page) from Default2.aspx (childpage).
So, we have to write the following ocde in Form_load event of default2.aspx.
Button1.Attributes.Add ("onclick", "alert(top.document.getElementById('TextBox1').value);");
Yeah. I know that it's not exactly what you want. But the idea is that you have to get the value of controls of the parent page by using Javascript. Then, try to find the way to access the those values from Code-behind. (Using Server-side hidden field is one of the communication between client-side script and server-side script. )
Hope it helps.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
You can do it with javascript.
For example:
add the following code on the child page
<br />
<script language="javascript"><br />
function Test()<br />
{<br />
var parentTextBox = parent.document.getElementById("TextBox1");<br />
<br />
alert(parentTextBox.value);<br />
}<br />
</script><br />
I am learning english
|
|
|
|
|
yeah. I agree with cheng.liu. Javascript is the only way you go.. Rana..
cheng.liu wrote: I am learning english
Oh. yeah. Me too..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
PS:
the Parent page and child page must under the same domain name.
//
cheng.liu wrote:
I am learning english
//
Oh. yeah. Me too..
//your english is very good.
/**-------------------------------------------**/
-- modified at 12:46 Monday 13th August, 2007
I am learning english.I am still having a few problem, but I getting better. I am very glad if you point my mistake in english.
TIA.
|
|
|
|
|
Thanks Everyone. I thought it was not possible, but was not sure so wanted the opinion of others. Thanks a lot again
Rana78
|
|
|
|
|
Hi,
I have a Gridview and one button ADD which will insert new row to Gridview and is outside of Gridview. Gridview contain one button DELETE column which is used to delete that row from gridview.
When the Delete button is clicked I want to delete that row For this I am doing like this: Where ID is the unique column in Gridview.
private DataRow FindRowByID(string id)
{
DataTable dt = (DataTable)Session["dt"];
DataRow[] rows = dt.Select("ID = " + id.ToString());
return rows[0];
}
Gridview_RowCommand()
{
if (e.CommandName == "RemovePartner")
{
string ind = e.CommandArgument.ToString();
FindRowByID.Delete(ind);
}
}
This is working fine when the inserted row ha ID value. If the user add a new row but did not enter any value into ID column and clicked on Delete then ID contain null value then how to delete that newly inserted row from Gridview.
Thanks
|
|
|
|
|
Mahimam wrote: ID contain null value then how to delete that newly inserted row from Gridview.
why not use Null Value as ID for deleting?
In our case, we don't allow the user to enter the ID. If the user enter new row then we generate the new ID (maybe the count of rows) for that new row. We use that id when we wanna delete the row..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|