|
either change your logic to create them at page init or read data at post back and write it back after binding.
|
|
|
|
|
Amar Chaudhary wrote: either change your logic to create them at page init
It works.
10x
|
|
|
|
|
is there key press event on asp.net ? (like in winform) ?
for example when i press enter or Esc on textbox control ?
thank's in advance
|
|
|
|
|
Yes, but you are really thinking of Javascript here. You can attach events to DOM elements, and the textbox supports the onkeypress event.
|
|
|
|
|
yes there is -
To do the same I will recommend you to use JS.
If for some reason you have to do it on server - highly unrecommended - you can turn auto post back on.
If there is something very critical and you need server at all costs then please try using webservices.
|
|
|
|
|
Hi,
In my application I am having a gridview on a page, I want its data to be loaded again only if there is any change at database end in spite of loading same data again and again.
|
|
|
|
|
for that, you have to your own mechanism. You can use cache to store the data and make the dependency on that, so whenever the data will be changed your Cache need to be reloaded, you can do this via callback. For details, have a look
Exploring Caching in ASP.NET
Now once you have new data then you can reload the grid.
|
|
|
|
|
hi
i have C# Winform program and i need to convert it to Webform.
can i get any simple sample for how to show database grid on screen,
add new, update and delete ?
i try to show table on screen like this:
SQL = "SELECT * FROM MEN order by Lname";
dsView = new DataSet();
adp = new SqlDataAdapter(SQL, Conn);
adp.Fill(dsView, "MEN");
adp.Dispose();
GridView1.DataSource = dsView.Tables["MEN"].DefaultView;
but i dont see nothing
|
|
|
|
|
After doing this you also need to call
GridView1.DataBind();
|
|
|
|
|
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
|
|
|
|