|
No, you can't do that. The reload method reloads the page using the same URL. If you want to change the URL, assign it to the location property.
Example:
window.opener.location = 'ThePage.aspx?id=42';
---
b { font-weight: normal; }
|
|
|
|
|
Hi ppls. im new to ASP.Net (And code project!) so i need bit help. Im doing project in ASP.Net 2.0 (visual basic). i know there are alot of new fun sqldatasource goodies that binds gridviews to ur data source. but the project im involved in is hardcoding everything.
The gridview is setup and populatd from a dataset. but wot i want is to retrieve a selected value(coloum value) wen i select a row on the gridview and store that value.
Aweh
-- modified at 2:42 Monday 7th August, 2006
|
|
|
|
|
whenever i am uploading any type of file through WebClient then it working fine but a header message is
adding at the top of the file and also at the end of the file.the header message is like as follows
-----------------------8c8882d5d3c358c
Content-Disposition: form-data; name="file"; filename="P2D Sales Credit Sample.xml"
Content-Type: application/octet-stream
i don't want to have the above header message because whenever i am uploading any picture file then
then this type header causes problem because only for this type of error the gif is not working properly.
suppose whenever i am opening this gif file the the picture is not showing only because of this header.
so pls tell me how could i avoid this header message with sample code.it is very urgent.
my code is
----------
WebClient oclient = new WebClient();
byte[] responseArray = oclient.UploadFile(txtURLToSend.Text,"POST",txtFileToSend.Text);
-- modified at 6:26 Monday 7th August, 2006
tbhattacharjee
|
|
|
|
|
is it possible to select a row (or multiple rows) by clicking the row header(s) for a datagrid control on client side? i want a java script.
|
|
|
|
|
you can use checkbox to select multiple rows in datagrid.
Best Regards,
Apurva Kaushal
|
|
|
|
|
hi! i want to use key event on datagrid for web form as they are available for window-datagrid control.
i want ...
[1.] when we click a row on client side on the data grid then it will get selected.
[2.] now when we press UP ARROW KEY, then next row up to the current row will get selected.
[3.] now when we press DOWN ARROW KEY then next row below to the current row will get selected.
how will this perform? please help me.
|
|
|
|
|
You'll need to write a bit of javascript there as most single keystrokes do not, thankfully, cause a postback to the server.
Try subscribing to the document.onkeyup event. If you determine that the up or down key was hit, force a postback and handle moving the datagrid selecteditemindex on the server. This will not be super fast as you'll postback a lot, but otherwise, I'm not sure how you can set the selecteditemindex in javascript as I believe it is in the viewstate. Try googling on selecteditemindex and javascript to see if you can make it happen w/o the postback.
|
|
|
|
|
but i want this only on client side using javascript without postback.
|
|
|
|
|
I hear ya. But I'm pretty sure the 'selectedindex' property of the datagrid is in the viewstate, which you are not supposed to mess with on the client manually (1st it's encrypted, 2nd ms says don't do it as they might change the format). Google selectedindex and javascript and datagrid and see what you can come up with.
|
|
|
|
|
There was an error message System.NullReferenceException was unhandled by user code
Message="Object reference not set to an instance of an object.".
Here is my code. Is there anything wrong? I have already set the PostBackUrl button from the previous page.
<br />
if (!Page.IsPostBack)<br />
{<br />
TextBox t = (TextBox)PreviousPage.FindControl("txtStartDate");<br />
lblStartDate.Text = t.Text;<br />
}<br />
-- modified at 0:06 Monday 7th August, 2006
thanks in advance. Much appreciated.
|
|
|
|
|
I suppose you don't have txtStartDate textbox on your page, thats why this exception is raised.
Pilo
|
|
|
|
|
i have that textbox obviously.
thanks in advance. Much appreciated.
|
|
|
|
|
In this case, if you really want people to help you to solve this problem, you should copy - paste your code.
if you declare this TextBox in aspx file, then paste it here (at least relevant part), if you create it dynamicaly, paste here code where you do so.
There is a possibility, that problem is with lblStartDate.
Try to debug your application and check each value, you will see if FindControls returns your desired textBox and if lblStartDate is not null.
Pilo
|
|
|
|
|
hi,
i think you are not giving the currect textbox name or textbox is not present
check the textbox name.
thanks
|
|
|
|
|
thanks. i checked many times, but it seems i type correctly, or rather copy paste correctly.:->
thanks in advance. Much appreciated.
|
|
|
|
|
Hi,
The problem could be, the reference to the page were the textbox(txtStartDate)is available might not be referred. If the textbox has to be referred from the current page were you want the reference you can do so by.
if (!Page.IsPostBack)
{
TextBox t = (TextBox)this.Page.FindControl("txtStartDate");
lblStartDate.Text = t.Text;
}
Hope this should work
Regards
Mohan
|
|
|
|
|
I tried and I faced same error.
I should be clearer with the error. It says:
if (!Page.IsPostBack)<br />
{<br />
TextBox t = (TextBox)this.Page.FindControl("txtStartDate");<br />
lblStartDate.Text = t.Text;<br />
}
<big>lblStartDate.Text = t.Text;</big> The error stops at this line saying "Object reference not set to an instance of an object."
The troubleshooting tips were:
Use the "new" keyword to create an object instance.
Check to determine if the object is null before calling the method.
thanks in advance. Much appreciated.
|
|
|
|
|
I hope my MS visual is not haunted.
thanks in advance. Much appreciated.
|
|
|
|
|
Is that TextBox is inside any other controls like DataGrid,DataList or Panel. The reason for the Problem could be:
1) If the TextBox(txtxStartDate) is not available in the respective page.
2) If the page reference is not set when calling this.Page.FindControl
3) If the TextBox is inside some other controls like DataGrid,DataList or Panel.
Please do check and come around.
P. Mohan
|
|
|
|
|
I am using MaterPages + .NET 2.0 Login Control.
I observed that if my webform had not used the MasterPages or the webform was not autheticated by the Login Control, the postback will work fine.
Is there a diferent code?
thanks in advance. Much appreciated.
|
|
|
|
|
I have a .exe file on my disk,I want to execute it using web form.
so,how should I write the code?
thank you!
KSCsoft
|
|
|
|
|
|
Hi, good day..
i face a problem when i debug my project. I'm using asp.net 1.1 to develope the project. When i start to debug my project, an error message display. The error message show like "Cannot start debugging. Cannot find Internet Explorer". What is the main cause of this problem? Before that i run well with my project.. Anyone can help me? Thanks..
Best Regards,
Pei Sun
|
|
|
|
|
Hai
I would like to show Five day weather forecast om my website . I gone through lot of webservices which provides only US weather infoemation. I need weather report of india. Can any one get me a good webservie that satisfy my needs
|
|
|
|
|
Weather.com's XML data feed[^] provides weather information for more than 50,000 locations worldwide (including India). See this[^] example.
/ravi
|
|
|
|