|
i didnt quite really get ur question.pls be specific
Cheers
Bino
www.codepal.co.nr
|
|
|
|
|
i want to display the output at a specific position in the page without using contols.ie,using response.write
|
|
|
|
|
use a div and position it anywhere in ur page.then write ur content to the div.
Cheers
Bino
www.codepal.co.nr
|
|
|
|
|
Hello All,
Can we Debug the Javascript? If yes then how...'
Regards
Aavesh
|
|
|
|
|
r u using .Net? then just put a debugger just before the position u need to debug.Now it will act as a breakpoint.
syntax
debugger;
Cheers
Bino
www.codepal.co.nr
|
|
|
|
|
Thanks for ur reply..i will check it...
Avesh
|
|
|
|
|
MS Script Debugger is good for this. But I always prefer to use firefox which shows what is the error in it's error console.
|
|
|
|
|
The best option is to install firefox and the firebug add in.
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 )
|
|
|
|
|
My blog website is supposed to be an asp.net application. And I am a total asp.net newbie. I have handled the back end process, i.e. posting the 'newly composed blog post' to database, via client script.
Now how do I view my new post directly or rather make my application navigate to the new post automatically. The steps involved for this process would be something like:
1. Find the new ID of the post (Any suitable logic used here, but I plan to definitely query my database for it!)
2. Navigate to that page. (This is what I am trying to achieve from client-end!!!)
If I were to do step 2 on the server I could write something like
Response.Redirect("ViewPost.aspx?blogID=" & blogIDFromDatabaseQuerying.ToString())
How do I accomplish the above from the client?
|
|
|
|
|
deostroll wrote: Find the new ID of the post (Any suitable logic used here, but I plan to definitely query my database for it!)
I'd prefer using an output variable and returning the id inserted. Assign this id to a public variable, and can be used in javascript for redirection.
var BlogId = <% =PublicVaribleForBlogId %>;
window.location.href = "ViewPost.aspx?blogID=" + BlogId
|
|
|
|
|
N a v a n e e t h wrote: window.location.href = "ViewPost.aspx?blogID=" + BlogId
won't take me to the proper location. If I had used this what appears on my address bar is something like: ViewPost.aspx?blogID=26
where as if I did a response.write I'd get it as
http://localhost/website/ViewPost.aspx?blogID=26
There is a difference...!
|
|
|
|
|
deostroll wrote: won't take me to the proper location. If I had used this what appears on my address bar is something like: ViewPost.aspx?blogID=26
Yes correct. You have to alter the redirect URL depends on your actual URL. I was just giving a demo. Hope it's working
|
|
|
|
|
Is there no way of using the server's functionality? I was thinking calling this "functionality" via client code somehow... So ultimately you are suggesting that I must "manually" edit my script to reflect a production scenario...? No other go?
|
|
|
|
|
Code what I suggested works on client side. It takes the public variable value from server. Then what's the issue here ?
|
|
|
|
|
Hey the code works!!! All I am saying is that right now I am working with the blog on my pc; therefore as long as it is on my pc I'd have to probably set my client-side script as: window.location.href = "http://localhost:1704/website/ViewBlog.aspx?blogID=" & blogid
But once this blog goes into production, i.e. it is public, I'd have to visit the above line of code and manually change it. What if in the future the name of my website itself is changed? This is not the answer I was expecting. I had even found ways to call server code from client-side, but this does not work like a normal postback; it is simply a callback rather. And hence I cannot use Response.Redirect(). It will give error.
To see what I mean try to modify this exercise[^]. In the place where we can actually pass a parameter to our client script code try inserting a response.redirect.
|
|
|
|
|
Finally I found the answer to this myself. It is some clever script coding (I found via another forum), and some knowledge of how to submit an html form AND how to handle __VIEWSTATE (which is the hidden culprit).
In vbscript it goes something like this:
<br />
sub OnPublish()<br />
'1. Code to push post to database...<br />
<br />
'2. Code to retrieve the last post's unique ID.<br />
<br />
'3. Code to navigate<br />
CurrentPageUrl = window.location.href 'Lets assume the current page = Current.aspx<br />
CurrentPageUrl = Replace(CurrentPageUrl, "Current.aspx", "ViewBlog.aspx"<br />
<br />
'Assume the unique ID is stored in a variable "blogid"<br />
<br />
CurrentPageUrl = CurrentPageUrl & "?blogid=" & blogid<br />
<br />
document.form1.action = CurrentPageUrl<br />
document.form1.__VIEWSTATE.name = "name" 'note: write this line exactly as it is...<br />
document.form1.submit()<br />
<br />
end sub<br />
|
|
|
|
|
Hi,
"TextBox txtNewName=(TextBox)GridView1.FooterRow.FindControl("txtNewName"); "
Iam using above code to capture the text of textbox but it was not working please tell any how to capture the childtextbox value of gridview
kirankumar
|
|
|
|
|
Dim sText as string<br />
For Each row As GridViewRow In gvAttachFile.Rows<br />
as string<br />
For Each = CType(row.FindControl("textBox1"), textBox).Text <br />
Next
Make some changes in syntax for c#.:->
Arun Singh
Noida.
|
|
|
|
|
try this
GridViewRow grow;
string ename = (grow.FindControl("txtName") as TextBox).Text
hope it will flicker the bulb, at least
Cheers
Bino
www.codepal.co.nr
|
|
|
|
|
kiran@p2softech wrote: TextBox txtNewName=(TextBox)GridView1.FooterRow.FindControl("txtNewName");
Try Using this
"TextBox txtNewName=(TextBox)GridView1.Rows.FindControl("txtNewName");"
If this helps then please rate this msg.
|
|
|
|
|
In which event you are trying to capture?
Intelligence is measured by common sense not by how many scholarly books you read.
|
|
|
|
|
When the page is post backed from the bottom of the page, how can i locate to the same position after post back?
Thks
|
|
|
|
|
<%@ Page MaintainPostBackPosition=true %> will help you if you are using ASP.NET 2.0.
|
|
|
|
|
|
still using VS2003 aah?
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|