|
okie picture is clear now, try calling this on html links
onclick='__doPostBack('method name to be called on postback','in arguments you can send id of page or something by which you can get which link is click! '
In your main page's code-behind, the method which is defined in __doPostback, set your search panel accordingly and open the page as per argument send by request.form['__EVENTARGUMENT'] (i might be wrong about this request.form's parameter just google how to get the value from it) and you're good to go
let me know if you need further help
Please don't forget to mark 'Good Answer', if you find it really a good one!
Kashif
|
|
|
|
|
lol.......Kashif,
sure i will..........
let me try once
|
|
|
|
|
Hi,
You can try this:
(1) JS:
PageMethods. backmethod (latlng,myCallBack);
(2) C#
[System.Web.Services.WebMethod]//you must write this;
public static String backmethod (Object xingcan)//must be static
{
…… //your logic
}
(3)
function myCallBack(result) {
var di = document.getElementById("Label1"); //for example
di.innerText=result;
}
The order is (1)-(2)-(3)。
April
Comm100 - Leading Live Chat Software Provider
modified 27-May-14 21:54pm.
|
|
|
|
|
using System.Windows.forms;
....
protected void btnSave_Click(object sender, EventArgs e)
{
SaveFileDialog s = new SaveFileDialog();
s.ShowDialog();
}
I want to open a saveDialog box to save a Web page...But When i run this coding it is showing me a error:
Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it. This exception is only raised if a debugger is attached to the process.
...
How to rectify this error?
|
|
|
|
|
Wrong Forum
|
|
|
|
|
Actually i wanted to save .aspx page as .html page
|
|
|
|
|
|
It is like saving a Web Page ...
When you are saving a web page it will open a save Dialog Box and ask Where
You want to save ..then that web page will be saved as a html page.
|
|
|
|
|
He;s confused because he can't work out how you thought this would work.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
You can do that using javascript. Use document.execCommand("saveAs") in the button click event.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
I used but that javascript is not working in Firefox.
It is working fine only in Internet Explorer.
|
|
|
|
|
In that case you try this[^] link. Might help.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
The problem is that you have no idea what you're doing. Your C# code will show a savefiledialog on the server, not on the client.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Please give difference between postbackurl and response.redirect.
and on which case we use postbackurl instead of response.redirect
Thanks in advance,
Anish Patel
|
|
|
|
|
Looking back, you have quite a history of incompetence. How about you read my article on how to use google and start to learn how to do basic research yourself ?
Here's a starting hint - what is postbackurl used for ? It's NOT used for redirecting pages, that's not it's core purpose.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
For simplified:
PostBackURL is more equivalent to Server.Transfer than Response.Redirect.
It maintains ViewState and all the rest of the Page object and other State Bags.
Response.Redirect simply sends a 302 to the browser.
Also, PostBackURL simply sets a CLIENT-SIDE script event on a button. So it doesn't work in all situations. Server.Transfer stays on the server.
April
Comm100 - Leading Live Chat Software Provider
modified 27-May-14 21:54pm.
|
|
|
|
|
This line of code is working properly for IE but not working with Firefox..
string scriptString = "<script language= 'JavaScript'> " +
"window.opener.document.forms(0).submit(); window.close(); </script>";
I am passing value from popup to main window..
Please let me know where I am wrong.
Thanks
|
|
|
|
|
|
You need to debug the javascript. Firebug is an excellent tool to debug javascript in firefox.
|
|
|
|
|
Hi
I have a sql, which groups data by firstly, region, and then by product range. However, what I need to show is the data in a gridview for each region with the countries shown in the gridview along with the products sold with totals. Therefore, I would have a title headed for the Region and Product Range, and then show the gridview for the detailed data for that region, and then repeat the process again for the next region and so on and so forth. I am not sure how to go about this, and so I am looking for help. I was thinking about collecting the data from the query in either a List Object and then binding this to a Object Data Source or an Array, but I am unsure plus I don't how I can then get the gridview to show the data.
|
|
|
|
|
This[^] might help you.
Don't forget to mark 'Good Answer' if you find it really good one
|
|
|
|
|
Hello all , i've a calender that i want the user to navigate through a particular period of time ,for instance he has to apply for a vacation 3 days in advance ,and can only apply for a vacation in this year , so the calender range should be from NOW +3 days to NOW + an year this is the code and the calender doesnt comply to it why? how to fix it?
Protected Sub ddlVacationTypes_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlVacationTypes.SelectedIndexChanged
Dim startDate As DateTime = Convert.ToDateTime(Now.ToShortDateString)
Select Case ddlVacationTypes.SelectedIndex
Case 0, 2, 3
startDate = startDate.AddMonths(1)
Case 1
startDate = startDate.AddDays(3)
End Select
Dim endDate As DateTime = startDate.AddYears(1)
Dim dateSpan As TimeSpan = endDate.Date - startDate.Date
Calendar1.SelectedDates.Clear()
Dim i As Integer = 0
For i = 1 To dateSpan.Days
Calendar1.SelectedDates.Add(startDate.AddDays(i))
Next
End Sub
modified on Monday, November 9, 2009 2:23 AM
|
|
|
|
|
|
Obout tools are awesome ,it opened a whole new world for me i really don know how to thank you ,Thank you veeeeeeeeeeeery muuuuuuuuuuuuuuuch
|
|
|
|
|
Most welcome friend.
Cheers.
|
|
|
|