|
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.
|
|
|
|
|
Set 'SmartNavigation' property of page to TRUE.
|
|
|
|
|
Hi everyone i've one WYSIWYG editor that im using in my classic ASP application. Im quite really unhappy with this control bcoz its not working in Mozilla and fine in IE.When i debug thru the code i found that these guys are using funny obscure document.all everyehere.I replaced it with getElementById and then i found insertAdjacentHTML which again is fixed using another workaround.But now im stuck up in attachEvent. Im not really getting any idea how to solve this.Please show me a way.
You can find my control in the forum section in www.codepal.co.nr.
Cheers
Bino
www.codepal.co.nr
|
|
|
|
|
Sean Archer wrote: But now im stuck up in attachEvent
attachEvent is a proprietary method for IE. For Netscape/Firefox use addEventListener instead
hope this helps
|
|
|
|
|
no,its not working
Cheers
Bino
www.codepal.co.nr
|
|
|
|
|
Bino B wrote: no,its not working
See the below sample
var Browser = navigator.appName;
if ( Browser != "Netscape" )
{
YourObject.attachEvent('onkeypress', editorEvents);
}
else
{
YourObject.addEventListener('keypress', editorEvents, true);
}
here editorEvents is the method which handles the events.
|
|
|
|
|
Hi
I've hosted a website in classic ASP backend MS Access.
Im getting this annoying error "Microsoft.Jet engine error System resource exceeded" and sometimes some funny error message like "Catastrophic Error".
I get to know that this is becoz of IWAM_USER permission on the corresponding db folder.But in my case im not supposed to(i can say i cant) modify the folder settings in some other server.What could be done in this case?Please shed some light on this.
my site is
www.codepal.co.nr[^]
and the thing is this funny error wont occur too often,it appears whenever we need to do something in an emergency as Murphy stated it
Cheers
Bino
www.codepal.co.nr
|
|
|
|
|
what happened to the techno geeks? y no one is responding?
Cheers
Bino
www.codepal.co.nr
|
|
|
|
|
I want to create a control that acts like a FormView. I want to have the ability to have a template arrow which allows me to convert a selected column to a TemplateField. Within that field, iwant tobe able to drag and drop controls into it and use the EVAL("fieldname") method to retreive values.
If you need any more clarifications, please let meknow. Your help is highly appreciated!!
|
|
|
|
|
Hello all,
Does anyone know of a good article that shows how to make a custom pager control that isn't tightly coupled to any particular ASP.NET control or to the databinding interfaces? What I need is basically something that allows you to:
1) Tell it the number of pages
2) Have it keep track of the current page, raising events when the page changes.
3) Implement First, Previous, Next, and Last navigation buttons (events should be fired on these as well).
All the tutorials I have been able to find assume that you are using this control along with a datagrid or at least a typical .NET datasource. I'm using NetTiers to return the data, but I'm doing a bit of manipulation to it before rendering, so I need something that just provides the paging UI, but no functionality. Any ideas?
Thanks,
Will
|
|
|
|
|
Well I have my own control but it is not in any articale. Here is what I do:
1. I have created four buttons for next, previous, first, last
2. Four mouse over images for the same
3. Four images for disabled buttons
4. Next thing I did was created a div with the following child controls:
a. Label on left side to display Total number of rows in the result set
b. Label iin the center to display Page x of y
c. Four navigation buttons (Asp:imageButton) on right along with a drop down list containing number of pages labeld as Jump To Page.
I use the above control [div] as a separate control on some pages and on some pages I add to the pager control of the gridview.
Now in case of a separate control, after binding the gridview, I show or hide this div depending on the results. And show the right buttons depending on the current page. (first and previous are disabled in case of first page and last and next are disabled in case of last page). I fill the drop down list (Jump To Page) depending on number of pages in the gridview. I also show right text on laebls (total and current page etc.)
-----
|
|
|
|
|
I'm a beginer of ASP.NET.
During developing, I found some problem that ASP.NET can't implements some works.
so I decided to develope windows application for my problem. but is it possible ASP.NET would includes this windows application(exe file)?
I'd like to give your careful help.
Please help me!!!
|
|
|
|