|
The below code is meant to get data from a db, display the first row, sleep for 2 seconds then display the second row. Can anyone spot what i may have done wron???
many thanks.
Dim ds As DataSet = New DataSet
ad.Fill(ds, "tblcustomers")
Dim dtab As DataTable = ds.Tables(0)
Dim dtabclone As DataTable = dtab.Clone()
Dim drow As DataRow = dtab.Rows(0)
dtabclone.ImportRow(drow)
GridView1.DataSource = dtabclone
GridView1.DataBind()
'gridview1
System.Threading.Thread.Sleep(2000)
drow = dtab.Rows(1)
dtabclone.ImportRow(drow)
GridView1.DataSource = dtab.Clone
GridView1.DataBind()
|
|
|
|
|
solarthur01 wrote: The below code is meant to get data from a db, display the first row, sleep for 2 seconds then display the second row. Can anyone spot what i may have done wron???
Your are confused & you are not aware of what you are doing. The code (I am not sure how it works) executes in the Server-side, and the final result would be the output of
solarthur01 wrote: Dim ds As DataSet = New DataSet
ad.Fill(ds, "tblcustomers")
Dim dtab As DataTable = ds.Tables(0)
Dim dtabclone As DataTable = dtab.Clone()
Dim drow As DataRow = dtab.Rows(0)
dtabclone.ImportRow(drow)
GridView1.DataSource = dtabclone
GridView1.DataBind()
'gridview1
System.Threading.Thread.Sleep(2000)
drow = dtab.Rows(1)
dtabclone.ImportRow(drow)
GridView1.DataSource = dtab.Clone
GridView1.DataBind()
I think, you should try it with JavaScript + HTML Tables
|
|
|
|
|
the above code works (partially). it only displays one record. It is meant to display one record sleep for 2 seconds, then display the next record(as the code specifies).
|
|
|
|
|
I have built a online photo album that will feature pics of great looking american women
with a chat box that talks with everyone. What I want to build is a message box that you hit a send button and send a message to the corresponding pic.
Any suggestions or where to look?
|
|
|
|
|
in my cs file of the page i have added
Button1.Attributes.Add("onclick", "window.showModalDialog('Lookup.aspx?new=edit',null, 'status:no;dialogWidth:570px;dialogHeight:500px;di alogHide:true;help:no;scroll:no')");
this works quite gud................. lookup page opens as a dialog
But i have two buttons on Lookup page,,,, when i click any the lookup page is opened as a web page not as a dialog.......... i dont need to open it again ........ i have simply added some functionality to the onclick events....
why the dialog button opens web page instead of refreshing itself
Thanx
|
|
|
|
|
In the lookup page's design view give the below tag inside head tag.
<base target="_self" />
Then try again.
arun
|
|
|
|
|
i did so but i still have the same problem........this donot solve it
|
|
|
|
|
it works .........there was an error in my code due to which the statement was not working
|
|
|
|
|
now i am facing another problem
i open the dialog form Page1.aspx using
LinkButton2 .Attributes.Add("onclick", "window.showModalDialog('Lookup.aspx?new=new', null, 'status:no;dialogWidth:555px;dialogHeight:575px;di alogHide:true;help:no;scroll:no')");
Now i have an HTML control (input button) in its Clickevent i want to set the value of TextBox1 of the Page1 but when i write
window.opener.document.getElementById('TextBox1').value='ads';
i get the error
document.opener.document is null or not an object
i have also tried
window.opener.parent but it also gives error
How can i do this
|
|
|
|
|
Instead of opener use window.dialogArguments .
LinkButton2 .Attributes.Add("onclick", "window.showModalDialog('Lookup.aspx?new=new', null, 'status:no;dialogWidth:555px;dialogHeight:575px;di alogHide:true;help:no;scroll:no')");
Pass the value of textbox in place of null in the showModalDialog method(second argument).And then use window.dialogArguments from dialog.
Arun J
|
|
|
|
|
Is there any way to get the final dimensions of an ASPX page before it is rendered? I don't mean the size of the browser window (Request.Browser.ScreenPixelWidth...). I mean the complete size of the ASPX page, counting areas that can only be reached via scrollbar -- as in, to get a page to render without scrollbars in the browser I would have to expand my browser viewing areay to X-by-Y pixels...
Or maybe I should explain what my end game is: I want to create a div that overlays my entire ASPX page under certain conditions. When I make an absolute div positioned at 0,0 and sized to 100%, it only creates a div the size of the browser client area. So if my page is scrollable and the user scrolls, I get a nasty cutoff-line where the div ends.
Thanks.
modified on Wednesday, January 30, 2008 5:06:34 PM
|
|
|
|
|
No, that is not possible. The size of the page can only be determined when it's displayed in the browser, and the size can change at any time while it is being displayed if the user changes the settings in the browser.
The size of the page can depend on many variables that you have no control over, like browser type and version, operating system type and version, desktop theme, display settings, font smoothing settings, browser text size, browser zooming, et.c...
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
Instead of using absolute in your css, can you use fixed ?
|
|
|
|
|
How cross-browser compatible is that mode? On some website somewhere I read that "fixed" mode exhibits very flaky behavior in IE. I'm running IE 7 and Firefox 2.0, but my client has over 400 clients of their own that use the system, so you know someone out there is going to have some really archaic browser.
I was able to center a small div regardless of scroll position using "fixed" in both IE7 and FF2. However, when I wanted to cover the rest of the screen in a 50% transparent gray cover to make the other div more visible, I encountered an IE 7 issues for which I found a bizzare work-around. The div tag:
<br />
<div runat="server" id="divTest" style="position:fixed; left:0px; top:0px; width:100%; height:100%; background-color:gray; filter:alpha(opacity=60); -moz-opacity: .60;"></div><br />
...seemed to work OK when I had not scrolled the page. However, when I scrolled the page to the bottom and clicked my button to show the div, only the upper half of the screen was covered. So much for "100%". HOWEVER, when I set the width/height styles in my CODE-BEHIND INSTEAD:
<br />
divTest.Style.Add("height", "100%");<br />
divTest.Style.Add("width", "100%");<br />
...then I do get 100% coverage, regardless of page scroll position.
WHATEVER!
|
|
|
|
|
hi,
what is the function of PostBackurl ?
i drag the Button1 Default.aspx and in Default.aspx.cs I intilize a
int i; and
protected void Button1_Click(object sender, EventArgs e)<br />
{<br />
<br />
Button1.Text = "" + i; i++;<br />
}
after site run ,when i click on the Button1 ,Button1.Text show '0'.its ok........ but when i click again it still Button1.Text show '0'.
but i want whenever i press the button1 then int i update every time
.......
|
|
|
|
|
zeeShan anSari wrote: what is the function of PostBackurl ?
MSDN[^] not working in Pakistan today? Or did it just not occur to you to read the documentation?
zeeShan anSari wrote: protected void Button1_Click(object sender, EventArgs e)
{
Button1.Text = "" + i; i++;
}
Where is i defined? Is it a class-level variable? Unless you cache the value of this variable between postbacks, for instance by using ViewState , it will be initialized to 0 on every postback.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
i initialized under :
public partial class _Default : System.Web.UI.Page
then how i can increment the int i value
|
|
|
|
|
zeeShan anSari wrote: then how i can increment the int i value
Use some stateful object. Session, ViewState, Cache etc.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
i cant get the value of any control in the javaScript function
function clickIt(droplist,x)
{
//alert is working
alert('it is step2');
//color of the row 2 which droplist belongs changes
droplist.parentElement.parentElement.style.backgroundColor='#88AAFF';
//HERE IS PROBLEM i Get Undefined in Alert
alert( droplist.parentElement.parentElement.cells[0].value);
}
|
|
|
|
|
You need to find the control via:
document.getElementByid("Codtrolid")
/***********************/
Parwej Ahamad
g.parwez@gmail.com
/***********************/
|
|
|
|
|
Hi All,
I would like to collect some information about the disadvantages of xslt programming. We have made a module frame work (in .net) which accept xsl and data can be returned by using xml.Then it is transforming. We have plan to use this module as much possible but got a chance to read some articles that indicating that xslt will access more memory and cpu usage and thus reduce the perfomance.
It would be really appreciating If anybody can provide me some proper information/guidance in that.And I have read some disadvantages of using ajax in xslt.More details in this topic also wonderful.
Please show me the right way...
Thanks in advance and expecting your reponses,
Rahul..
SoftwareDeveloper(.NET)
|
|
|
|
|
Rahul.P.Menon wrote: I would like to collect some information about the disadvantages of xslt programming.
This question is of too broad a nature to be answered properly within a programming forum. Also, it isn't relevant to the ASP.NET forum. I'm not sure what you mean by 'disadvantages'? XSLT was designed for a specific purpose - performing transformations on XML documents. This could be from one XML schema to another, or to a different document format e.g. HTML or a flat file. It is usually preferable to use XSLT for this purpose rather than a general-purpose language.
Rahul.P.Menon wrote: And I have read some disadvantages of using ajax in xslt.More details in this topic also wonderful.
Without an understanding of what you are trying to do, it's difficult to offer advice. What have you read? How do you want to make use of AJAX and XSLT?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Thanks much for the responses..Let me put more detail to get an exact advice..
For example if we have simple form to submit in our scenarion and see the two possibilities
1) A .net application made and complied and which can read the xsl and transform and shows up the data in an ascx page. So for the above scenario we can use that and develop a xsl to design the form then submit it using a form post and passing the data to the procedure specified in the xml to inserting/updating
2) This way is straight forward as we can design a form using asp.net and compile the code and add the logic to submit.but in this case again need to compile the code is required and if any more changes again compile the code. But in the first way only need to change the xsl file and no compile required.
By considering these two ways which way you will suggest and why...Please count the perfomance measures also while decide a way..That can be a right advice for me for the scenario.
Thank you,
Rahul..
SoftwareDeveloper(.NET)
|
|
|
|
|
Rahul.P.Menon wrote: By considering these two ways which way you will suggest and why...Please count the perfomance measures also while decide a way..That can be a right advice for me for the scenario.
What do you think? I'm not going to tell you what to do. As a developer, you should be able to evaluate different solutions to a problem and make a judgement about which is most appropriate given the circumstances.
Here are some points you might want to consider. What is the relative complexity of the two approaches? Which of them do you, or your colleagues have the technical skills to implement? What time/resources do you have at your disposal, and what do you think you can realistically achieve within their constraints? What are your customer requirements, and how complicated an approach do they warrant?
I don't know anything about your company so I can't answer these questions for you. All I can suggest is that you consider these points when you make your decision.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
I know all these measures and I think finally our discussion went out of scope..I was just searching for the disadvantages of xslt programming as I saw in many articles that it will slow down the perfomance..I was not really looking for the feasibility of the application and the scenario provided is to just make it in detail..
I don't think that my query really needed any company name or SRS to get it answered..Just looking for some responses from those who really knows the disadvantages of xslt. Thats it..
Thank You,
Rahul..
An answer comes from knowledge really differs from the answer which is just build for it
|
|
|
|