|
Gali1978 wrote: i dont see nothing
So what do you see then?
|
|
|
|
|
|
I have a datatable with around 6000 rows and 8 columns. Out of these, I want to extract all the 6000 rows but only 3 or 4 columns. Looping trhough row is not possible. How can i extract only the columns along with the rows to a new datatable? Please help.
Is it possible using LINQ? I am using .Net 3.5.
Thanks,
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
OK, I'll bite, why do you need it in a new DataTable?
Rhys
"I'd rather die on my feet than live on my knees"
|
|
|
|
|
Why because, the requirement is that, the column name should be the name from the database which user entered through UI (User friendly column Names). And one column will be mapped to multiple columns, means column A in datatable 1 will be named as 'TestColumn1' and 'TestColumn2' even though the column values are exactly same. Also, only require 3 or 4 columns out of 8 or 10.
So I can keep the existing table intact and copy only the required columns to new datatable and change the name.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
|
Hi,
In my asp.net 2.0 web application, I have an aspx page from where I am opening an HTML window with javascript:window.open(url,etc,..). The HTML page contains a flash component and a HTML button control . What I want to do is, on the click event of the button control in the HTML page, the HTML page should close and the aspx page (which is still open) to get refreshed.
Can someone suggest me way?
Thanks in advance,
GeoNav
|
|
|
|
|
I think this can be done easily.You should call the following javascript function on HTML page
function CloseandRefreshParent()
{
window.opener.RefereshPresentPage();
window.close();
}
and have the following function on your aspx page
function RefereshPresentPage()
{
window.location.href = window.location.href;
}
Now as you can see from the code,
first function calls the method RefereshPresentPage of the parent page, which actually refreshes that parent page and window.close() actually closing the current window.
Let me know if you face any issue
|
|
|
|
|
Hi,
Thanks. It works like a charm........
But i notice that other control, such as text boxes and comboboxes, have their values set to default values..... It is important to retail their values, since I am using script on a biodata form......
Thanks,
GeoNav
|
|
|
|
|
Hey,
I found a solution by using the Java script 'window.showModalDialog(url); window.document.images['imageControlName'].src='imagePath';'
This opens a page in modal window and when I close this window, the image control in parent page gets refreshed. Other controls are not affected.
Thank you so much for your help.
GeoNav
|
|
|
|
|
Hi,
I am looking for example to develop Horizontal menu with vertical submenu - similar to the one existing in the codeproject.com site using html,javascript, css.
Any examples ?
Thank You
Andyyy
|
|
|
|
|
After palying around with trying to build nice looking user interfaces, I went out and bought their ASP.NET Ajax controls. My applications look so much better.
download their controls and you will see a nice menu control.
My 2 cents.
david
|
|
|
|
|
How many levels do you need? Do you need different formatting options for different menu items?
For example. Here on this forum there is the horizontal menu with Home, Articles, Q & A, Learning Zones etc. If all you need is that with sub menus like the ones under Learning Zones that is one level. If you need a call out box for third level menus like the ones under Q&A, Application Lifecycle, that is something else. If you need your menus to support custom stuff like the Chapters and Sections menu under articles. Figure out which of those features you need and we can make better recommendations.
Also, you might want to mention what browsers you plan to support.
|
|
|
|
|
T M Gray wrote: If you need a call out box for third level menus like the ones under Q&A, Application Lifecycle, that is something else.
Yeah this is what am looking for at the moment.
T M Gray wrote: If you need your menus to support custom stuff like the Chapters and Sections menu under articles.
Not at the moment but am very interested to know how that's done..
T M Gray wrote: what browsers you plan to support.
Well mainly safari, firefox and IE.
Thank you
Andyyy
|
|
|
|
|
|
Hy,
I have two application which are running simultaneously (p1,p2). If i am working on application p1, i have to restart the clock of application p2 also.For this i have written a java script code which works perfectly on my machine but gives error in server.
Here is my code
string strOut = @"
<SCRIPT language='JavaScript'>
var tparent;
alert('In PC.SearchResult.ascx Script');
debugger;
try{
if(parent.EnableClock == null)
{
alert(' In PC.SearchResult.ascx Script:parent.enableclock=null');
alert(parent.parent.EnableClock);
if(parent.parent.EnableClock == null)
{
alert('In PC.SearchResult.ascx Script: parent.parent.enableclock=null');
tparent = parent.parent.parent;
}
else
{
alert('In PC.SearchResult.ascx Script: parent.parent.enableclock!=null');
tparent = parent.parent;
}
}
else
{
alert('In PC.SearchResult.ascx Script: parent.enableclock!=null');
tparent = parent;
}
alert('The value of tparent is');
alert(tparent.value);
tparent.resetClock();
tparent.EnableClock = true;
alert(" + Session.Timeout.ToString() + ");" +
"tparent.startClock(" + Session.Timeout.ToString() + " );} catch (err){alert(err.message)}</SCRIPT>";
// string strOut = @"<SCRIPT language='JavaScript'>try{var tparent;if(parent.EnableClock == null){if(parent.parent.EnableClock == null){tparent = parent.parent.parent;}else{tparent = parent.parent;}}else{tparent = parent;} tparent.resetClock();tparent.EnableClock = true;tparent.startClock(" + Session.Timeout.ToString() + ");}catch(err){alert(err.message);}</SCRIPT>";
Response.Write(strOut);
The error that i get is when the debugger goes on "parent.parent",it says "ACCESS IS DENIED"
Please help
|
|
|
|
|
Please read and understand the guidelines for this forum. When posting code snippets use the pre tags, i.e. the "code block" menu item above the textbox where you entered your message.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I open a web page with window.showModalDialog() and it works great
But when I type text in text box , TextChanged action has- then the window opened on a regular web page How can I prevent this?
|
|
|
|
|
Try to get the focus, to the new window.
First Page:
<html>
<head>
<title>Page 1</title>
<script language="JavaScript">
function func() {
newwin=window.showModalDialog("ModalPage.html", "popup",
"dialogLeft:50px;dialogTop:50px;dialogWidth:300px; dialogHeight:200px;center:
0");
}
</script>
</head>
<body>
<form>
<input type="button" value="Open" onClick="javascript:func()">
</form>
</body>
</html>
ModalPage:
<html>
<head>
<title>Modal Page</title>
<script language="JavaScript">
function setVar() {
document.forms[0].Name.focus();
}
</script>
</head>
<body onload="javascript:setVar()">
<form>
<input type="text" name="Name" value="Hello !!">
</form>
</body>
</html>
|
|
|
|
|
suppose i am showing images through datalist control. datalist have 5 rows and 5 columns. all rows and all columns will show a small image. so when i am showing images then it is taking little time. so i want to show a image pre-loader for each image. so at the very beginning when page will be running then many busy indicator will show for each image and when each image will show in the page gradually then image preloader for that image will be invisible. so please guide me how to develop my image gallery in this way.
example site is http://davidwalsh.name/dw-content/lazyload-fade.php
i want the output like above url.
thanks
tbhattacharjee
|
|
|
|
|
You will need to use some Ajax. Post a progress image in place of the image and call an Ajax method to download the image asynchroniously, then update the image when complete. There are many, many resources and examples of this methodology.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Good Day Everyone
i have a javascript function written like this
function TestForDuplicates() {
var Texboxes = new Array();
Texboxes[0] = document.getElementById("<%= txtUnitLen1.ClientID %>").value;
Texboxes[1] = document.getElementById("<%= txtUnitLen2.ClientID %>").value;
Texboxes[2] = document.getElementById("<%= txtUnitLen3.ClientID %>").value;
Texboxes[3] = document.getElementById("<%= txtUnitLen4.ClientID %>").value;
Texboxes[4] = document.getElementById("<%= txtUnitLen5.ClientID %>").value;
Texboxes[5] = document.getElementById("<%= txtUnitLen6.ClientID %>").value;
Texboxes[6] = document.getElementById("<%= txtUnitLen7.ClientID %>").value;
Texboxes[7] = document.getElementById("<%= txtUnitLen8.ClientID %>").value;
Texboxes[8] = document.getElementById("<%= txtUnitLen9.ClientID %>").value;
Texboxes[9] = document.getElementById("<%= txtUnitLen10.ClientID %>").value;
Texboxes[10] = document.getElementById("<%= txtUnitLen11.ClientID %>").value;
Texboxes[11] = document.getElementById("<%= txtUnitLen12.ClientID %>").value;
Texboxes[12] = document.getElementById("<%= txtUnitLen13.ClientID %>").value;
Texboxes[13] = document.getElementById("<%= txtUnitLen14.ClientID %>").value;
Texboxes[14] = document.getElementById("<%= txtUnitLen15.ClientID %>").value;
Texboxes[15] = document.getElementById("<%= txtUnitLen16.ClientID %>").value;
Texboxes[16] = document.getElementById("<%= txtUnitLen17.ClientID %>").value;
Texboxes[17] = document.getElementById("<%= txtUnitLen18.ClientID %>").value;
Texboxes[18] = document.getElementById("<%= txtUnitLen19.ClientID %>").value;
Texboxes[19] = document.getElementById("<%= txtUnitLen20.ClientID %>").value;
var btn = document.getElementById("<%= btnComplete.ClientID %>");
document.getElementById("<%= hidDuplicate.ClientID %>").value = findDuplicates(Texboxes);
return false;
}
and i am using the Function on the server side like this
protected void btnComplete_Click1(object sender, EventArgs e)
{
Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "TestForDuplicates();", true);
if (hidDuplicate.Value == null || hidDuplicate.Value == "")
{
Response.Write("<script>alert('There are no Duplicaets');</script>");
}
else
{
Response.Write("<script>alert('There are Duplicate Units: " + hidDuplicate.Value + "');</script>");
}
}
and the button is defined like this
<asp:Button ID="btnComplete" runat="server"
Text="Complete" Width="83px"
TabIndex="20" onclick="btnComplete_Click1" />
and the hidden field like this
<asp:HiddenField ID="hidDuplicate" runat="server" />
Now this is working fine but , lets say i have 10 textboxes, if i change the value one the first textbox to be the same as the second textbox , it means it is a duplicate, now the problem here is that the value of the hidden field does not get updated immidiately , you have to click twice to get the real value.
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
If the purpose is to check for duplicate values before posting the page back to the server then why are you not performing the check on the clientside before the submit?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Your problem has to do with the setting of the hidden field. So you posted all of the code except for the function that sets the hidden field. You also should have something in the onclientclick of your button that will set the value on the hidden field before the submit happens.
|
|
|
|
|
Good Morning Gray
in the code i posted , there i part that assigns the hidden field with a value
document.getElementById("<%= hidDuplicate.ClientID %>").value = findDuplicates(Texboxes); and the same javascript function gets called on the server side like this
Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "TestForDuplicates();", true);
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|