|
I have two resultset comes from two datatable
For example
Datatable1
----------
Id description
-- -----------
100 Home
101 Office
102 Practice
103 Training Centre
Datatable2
----------
Id description
-- -----------
100 Home
102 Practice
I want to compare the above datatables and bind the unmatched records in the GridView
The result should be
Id description
-- -----------
101 Office
103 Training Centre
how can i get the above result?
My code
--------
DataSet dsFetchAddress = null;
DataSet dsFetchAddressType = null;
DataTable dtFetchAddress;
dsFetchAddress = m_Profile.FetchFacultyAddress(m_factultyKey);
dsFetchAddressType = m_Profile.FetchAddress();
dtFetchAddress = dsFetchAddressType.Tables[0].Select("Id! ='dsFetchAddress.Tables[0].Select("Id")'");
I don't the exact syntax.
pls give the solution.
|
|
|
|
|
Hi programmers,
i have a problem , in my webform class i have 1 property and 2 method i want to access this property and method in to my other general class that is test.vb
but i tried with creating the object of class of webform but in .net intellisence is not recognizing the class
please help me to make it work.
thanks
2) my second question is im changing the text of texbox using the javascirpt .how to use this textbox text in general class like test.vb
thanks
|
|
|
|
|
Creating an instance of the webform class makes no sense. If the property you're after can exist outside of the form ever existing, then it should be factored out into a middle tier class. And if you're trying to access a value in a web form, you need to use the form instance that is generated when someone browses, creating a new instance creates new values, not the ones you're looking for.
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 )
|
|
|
|
|
Thanks for your response,
My situation is like this.i have a webform which is changing textbox text based on javascriptfunction.i want to send this value to middle tier with out any postback.i m using callback but in page_load it is not taking the textbox text value to changed text
|
|
|
|
|
MD12 wrote: in my webform class i have 1 property and 2 method i want to access this property and method in to my other general class that is test.vb
but i tried with creating the object of class of webform but in .net intellisence is not recognizing the class
It's a wrong coding approach.
Regards J O H N
"Even eagles need a push." David McNally
|
|
|
|
|
In my site I have used AjaxPro library to perform method invocation on the server side without postback.
My javascript code is something like this:
function my_func()<br />
{<br />
var response = test.my_serverside_method(1,2,3);<br />
if(response.error != null)<br />
{<br />
alert('error');<br />
}<br />
else<br />
{<br />
alert(response.value);<br />
}<br />
}
In this function I have invoked the serverside method and used its result.What I want is to show a message somewhere in the page dynamically before the function my_func is invoked. But my problem is that when I try to make a change on the page for example setting the innerText property of a span tag , the change does not appear immediately .
This is the code:
SetMessage('Please wait ...');<br />
my_func();<br />
SetMessage('Data fetched !');
The function SetMessage sets the innerText property of a span tag to the argument passed.
It takes some seconds for the my_func function(its code shown) to get the data from the server. It is supposed when the above code runs first the message "Please wait ..." apears on the page and after some seconds the my_func function gives its results and then the message "Data fetched" appears. But in my case the first message is not shown at all and just the my_func is invoked and then the second message appears. How can I solve this problem ??? I hope you understand my problem . Please help me . Thanks.
-- modified at 14:33 Saturday 8th September, 2007
|
|
|
|
|
I've created a PagingIndex user control that takes a data source and allocates PageSize keys from the data source to each of a collection of PageEntry objects. Each PageEntry has a first and last property, e.g. "A - C", and I use a Repeater control with a Button as my item teplate. So, every Page entry has a button with, again, e.g "A - D" n it, if that range is <= PageSize, otherwise I subdivide, giving "Aa - As", followed by "At - Be" etc.
I currently use a one column table to contain the buttons, but was wondering, as I follow the school that asserts we should only use tables for tabular data, and not layout. What would my alternatives be for not using a table? An ItemTemplate with a <asp:button> followed by suggests itself, but a table nicely disributed the button heights over the height of the containing div of the control. It;s not a big issue using a table, but I'm just curious as to other options.
|
|
|
|
|
Brady Kelly wrote: An ItemTemplate with a followed by
suggests itself
I can't see what you mean. Use the "Ignore HTML" option when you are posting markup code.
---
single minded; short sighted; long gone;
|
|
|
|
|
I have Microsoft SQL Server 2005 and I want to add Database to App_Data folder but it is giving me error that I cannot add because I need SQL Server Express 2005 to be installed?
Is there any way to add Database to App_Data folder?
Thanks
|
|
|
|
|
shah123 wrote: I need SQL Server Express 2005 to be installed?
Actually yes.
VS needs SQLServer runtime to work with it.
SQLServer 2005 Express included in VS 2005 DVD. install it from there.
|
|
|
|
|
But why should i install SQL Server Express as I have already SQL Server Management Studio installed?
|
|
|
|
|
Hi,
I've a IFRAME and using it as textEditor for Emails but i'm not receiving the mail as formatted text as i've done it in my IFRAME textEditor i'm just receivng it as simple text becoz i'm first containing IFRAME text in a hidden text............... Plz suggest me some other ways to do it.............
I can use some other free textEditor but suggest me something in this favour.....
Thnx
-- modified at 5:07 Saturday 8th September, 2007
|
|
|
|
|
Hey all,
I have a DropDownList control in my page.
I set the AutoPostBack property to true and also created the SelectedIndexChanged event method.
Everytime I change the index it supposes to call the SelectedIndexChanged event but it only call it when index is not zero
With the use of debugger and breakpoint at this method I realized that when the dropDownList's SelectedIndex is not zero - the event is raized but when the index is zero it ignores the event
Please help
RoyRose
|
|
|
|
|
I have another comment..
The problem was with index 0
I realizes that when I set the item in index 1 to selected = true the event not fired to it!
<br />
<asp:DropDownList ID="_TableDropDownList" ... OnSelectedIndexChanged="_TableDropDownList_SelectedIndexChanged"><br />
<asp:ListItem>cities</asp:ListItem><br />
<asp:ListItem Selected="True">courses</asp:ListItem><br />
</asp:DropDownList><br />
I set all items with Selected="False" but still when I choose the item in index zero it won't fire the event..
|
|
|
|
|
Youn can find one solution for that you can add some other listitem in place of listitem at 0 index as select or please select one or select one, or 0th index item you keep it nothing like
<asp:dropdownlist id="_TableDropDownList" ...="" onselectedindexchanged="_TableDropDownList_SelectedIndexChanged">
<asp:listitem>
<asp:listitem>cities
<asp:listitem courses<="" asp:listitem="">
|
|
|
|
|
I'm king of lost here...
this situation is very weird because the event is not fired when I select the first item in my drop down list..!
Let me tell you the exact problem:
I have a user control with a drop down list control.
This control is auto post back to server when index is changed.
When I select the second(or third, forth etc) item - the event method
_TableDropDownList_SelectedIndexChanged is being called.
When I select the first item this event isn't fired - so _TableDropDownList_SelectedIndexChanged is not being called!
I use breakpoints in this event method and also in page_load method and I can say that page_load is happend but _TableDropDownList_SelectedIndexChanged isn't. it just ignores it somehow when I select the first item...
Someone please
RoyRose
|
|
|
|
|
hello any one can provide me links for active reports for vb source code how to design checkbox and button and barcode in active reports (i.e) pdf format and when we click a link in the asp page it will invoke pdf format .Can any one tell me how to do it . any examples or any links.
Thanks in advance.
|
|
|
|
|
This is the ASP.NET forum, try the web development forum for asp questions.
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 )
|
|
|
|
|
Check new username availability with ASP.NET without sending request to server.can you provide me the complete code
|
|
|
|
|
Visit GridView Javascript Click Row and Ajax.
Its totally differ from ur requirement but U can accomplish ur task using this.
best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
Dear All,
I have a gridview where first 2 columns are bound fields.
Next 3 columns have template fields with textboxes which are requiered to be filled by user.
i want if user does not provide any value, should be informed then and there through javascript.
I have written one which displays message but focus moves to next field.
I have given my code below.
Please help me.
Thanks;
-----------------------------
var gridViewCtlId = '<%=gridview1.ClientID%>';
var gridViewCtl = null;
var curSelRow = null;
var curRowIdx = -1;
function getGridViewControl()
{
if (null == gridViewCtl)
{
gridViewCtl = document.getElementById(gridViewCtlId);
}
}
function onGridViewRowSelected(rowIdx)
{
var selRow = getSelectedRow(rowIdx);
if (null != selRow)
{
curSelRow = selRow;
var cellValue = getCellValue(rowIdx, 0);
alert(cellValue);
}
}
function getSelectedRow(rowIdx)
{
return getGridRow(rowIdx);
}
function getGridRow(rowIdx)
{
getGridViewControl();
if (null != gridViewCtl)
{
return gridViewCtl.rows[rowIdx];
}
return null;
}
function getGridColumn(rowIdx, colIdx)
{
var gridRow = getGridRow(rowIdx);
if (null != gridRow)
{
return gridRow.cells[colIdx];
}
return null;
}
function getCellValue(rowIdx, colIdx)
{
var gridCell = getGridColumn(rowIdx, colIdx);
switch(gridCell.childNodes.item(0).value)
{
case "":
gridCell.childNodes.item(0).focus();
alert("Please enter the value");
break;
return false;
default:
return true;
}
}
--------------------------------
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
LoadGridData()
End If
For Each row As GridViewRow In GridView1.Rows
rowIndex = rowIndex + 1
For ctr = 0 To 4
CType(row.FindControl("Textbox" + (ctr + 1).ToString), TextBox).Attributes("onblur") = "javascript: return getCellValue(" + rowIndex.ToString() + "," + ctr.ToString() + ")"
Next
Next
End Sub
sanjay kumar samantaray
|
|
|
|
|
Validate Textboxes values on RowDataBound Event of Gridview.
Try this code
OnRowDataBound Event:-
((TextBox)e.Row.FindControl("Textbox)).Attributes.Add("onblur","return Validate("+((TextBox)e.Row.FindControl("Textbox)).ClientID+");");
Javascript Function:-
Validate(txtID)<br />
{<br />
if(document.GetElementByID(txtID).value=="")<br />
{<br />
alert('Please Eneter Value.');return false;<br />
}<br />
else<br />
{<br />
return true;<br />
}<br />
}
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
I have a solution from the internet to acheive transferring of session variables. My application is failing with the following message:
The type of page you have requested is not served because it has been explicitly forbidden. The extension '.asp' may be incorrect.
Does anyone know what needs to be done to "read" ASP forms in an ASP.Net 2.0 web application?
Thank you,
Patrice
|
|
|
|
|
You can't. The best you can do is to look for solutions, which generally involve thngs like a windows service, which stores and passes values using the session Id, which will be the same.
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 )
|
|
|
|
|
hi everyone
i need to know how can i make submenus dropped out of menus through onmouseover event
just like those on the disney and india websites
http://www.incredibleindia.org/
http://disneybooks.disney.go.com/
thanks for your help
|
|
|
|