|
sc steinhayse wrote: I tried that option
What option?
sc steinhayse wrote: it did not work.
What did not work?
If you expect people to help you then you need to explain exactly what you are doing, what results you expect and what results you actually see. Saying "it did not work" gives us no information.
|
|
|
|
|
I am trying to pass a value from a pop up window back to the parent page. The query string is successful, but it wont go back to the previous page, but instead the pop-up window will redirect to the previous page with the values. What I want to do is close the pop-up window, and go back to the previous page with the values. Here are the code that I currently have:
//this is action performed when the button to submit the values are clicked
protected void btnSelect_Click(object sender, EventArgs e)
{
GridViewRow row = grdAll.Rows[SelectedProductIndex];
name = row.Cells[2].Text.ToString();
Industry = row.Cells[3].Text.ToString();
SubInd = row.Cells[4].Text.ToString() ;
geo = row.Cells[5].Text.ToString();
location = row.Cells[6].Text.ToString();
Page.Response.Redirect("frmMain.aspx?name=" + name + "&industry=" + Industry + "&subInd=" + SubInd + "&geo=" + geo + "&location=" + location);
}
//this is the page_load of the parent window
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (Page.Request.QueryString["name"] != null)
{
txtMPSname.Text = Page.Request.QueryString["name"].ToString();
txtLoc.Text = Page.Request.QueryString["location"].ToString();
DlstGeo.Text = Page.Request.QueryString["geo"].ToString();
DlstInd.Text = Page.Request.QueryString["industry"].ToString();
DlstSubInd.Text = Page.Request.QueryString["subInd"].ToString();
}
}
}
|
|
|
|
|
I THINK U SHOULD TRY THIS
U SHOULD CREATE A BUTTON INSIDE THE POP-UP PAGE NAMED "BACK", THEN GIVE IT THIS CODE:
Form1 frm2 = new Form1();
this.Hide();
frm2.Show();
frm2.Region = this.Region;
|
|
|
|
|
Hi,
Instead of "Response.Redirect()" use the javascript function like this.
function closeFrm(val1,val2,val3,val4,val5)
{
self.close();
window.opener.location.href = "frmMaain.aspx?name=val1&location=val2&geo=val3&industry=val4&subInd=val5";
}
and call this function through code as below.
ScriptManager.RegisterClientSciptBlock(this,this.GetType(),"Myscript","closeFrm('"+ name +"','"+ location +"','"+ geo +"','"+ Industry +"','"+ SubInd +"'");
Hope it works.
with regards
Karthik Harve
|
|
|
|
|
I'm getting an error :
Error 1 on this line
ScriptManager.RegisterClientSciptBlock
thanks,
|
|
|
|
|
That's a typo. Obviously he meant:
ScriptManager.RegisterClientScriptBlock /ravi
|
|
|
|
|
Is there a way to programmatically create unix ftp profiles and user accounts.
If the account access info is changed on the server it can get back to the .net web application to update the database?
|
|
|
|
|
It's not clear what this has to do with C#.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
You're going to have to provide a LOT more detail about what you're doing and how you're doing it. Right now, this doesn't appear to have ANYTHING to do with C# or writing code.
|
|
|
|
|
As the others have said, please be more clear. What does this have to do with C#, unless you are trying to do it in C#. Show what you have done thus far...
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
I have a class that inherits NativWindow, I would like the same class to also implement IDisposable.
The problem is that C# wont let me inherit NativWindow and IDisposable (multiple inheratence).
So, is it posible?
Or is there some reason why I should not even be trying to do this?
Thanks.
“If I had asked people what they wanted, they would have said faster horses.”
― Henry Ford
|
|
|
|
|
__John_ wrote: The problem is that C# wont let me inherit NativWindow and IDisposable (multiple
inheratence).
No, it doesn't. You're allowed to inherit from one base class, and you can implement multiple interfaces. If you wrapped your IDisposable in a class, then you should read up on creating a composition .
Good luck.
Bastard Programmer from Hell
|
|
|
|
|
Thanks Eddy.
“If I had asked people what they wanted, they would have said faster horses.”
― Henry Ford
|
|
|
|
|
You're welcome
|
|
|
|
|
BindingNavigator save button does not save info to table.
Detail for two tables dragged into a form. Using BindingNavigator add a new record, Enter data in the form. Using save button in navigator Saves the data for main table but not the one connected by foreign key.
|
|
|
|
|
DOn't post the same question in multiple forums. It's not going to get you an answer any faster and it prevents collaboration and discusson on answers.
|
|
|
|
|
I have an 8x8 grid...On the grid i have a robot standing in the origin point (0,0)
Also,i have a little lamp placed at any tile RANDOMLY at the start of puzzle.
The robot can only move square by square either horizontally or vertically (no diagonals allowed!)
The robot wants to get to the lamp as quickly as possible (means in the least number of moves possible)
So how can i shorten the path?
|
|
|
|
|
|
The general answer to any pathfinding question is "have you checked out A*[^]?". So, have you? In the case of a uniform grid with no obstacles you can just go straight for the target, but I'm guessing this is a preliminary to pathfinding with obstacles, and in that case A* is exactly what you'll want.
|
|
|
|
|
How can I display 0 and 1 data in square wave form like in logic analyzer view in to datagridview controls or there is a special control for this kind of requirement?
|
|
|
|
|
The DGV isn't really into doing graphics like a logic analyzer. I think this would have to be a custom drawn control, like a Panel. That's WAY too much material to cover in a couple of forum posts.
|
|
|
|
|
Using any Control for individual bit samples is a horrible idea. What you need is one Control for the entire logic analyzer (or maybe one per channel), and within such Control paint all the time points yourself. I would use a Panel, and make extensive use of Graphics.DrawLine; there are only four cases to consider for previous and current sample:
- both 0: draw a horizontal line low;
- both 1: draw a hor line high;
- 0 becomes 1: draw a vertical line, then a hor line high;
- 1 becomes 0: draw a vertical line, then a hor line low.
And no, I don't have an example handy.
I do have an article[^] that gives the basics for graphics, and in essence it says store your data in some structures, then paint those structures inside the (On)Paint handler.
|
|
|
|
|
Thanks Luc Pattyn,
Graphics.DrawLine is a good start for me.
- both 0: draw a horizontal line low;
- both 1: draw a hor line high;
- 0 becomes 1: draw a vertical line, then a hor line high;
- 1 becomes 0: draw a vertical line, then a hor line low.
The user needs to manually construct/enter the wave form graphically one bit at a time and able to save and load the wave form.
Do you think I can draw line inside DGV cell?
|
|
|
|
|
panto_ph wrote: Do you think I can draw line inside DGV cell?
I might be able to, but I don't plan on doing so as it makes no sense IMO. Forget DGV for this.
|
|
|
|
|
Do you mean, the contents of a single cell should contain a complete signal trace? Or do you have a data structure where cells contain single 1s and 0s?
In the former case, you need a custom control which you can put into a DGV (I think you have to inherit from DataGridViewCell but I forget exactly, it's a long time since I've done something like this). In the latter, you want a custom control which will draw the entire trace for you, you shouldn't be using a DGV at all in that case.
|
|
|
|