|
So it depends what is before line:
ASP continuation code:
After you click submit, page reloads and quite a few events are fired that will let you handle information posted on form. You should override page_load event possibly checking the if it was postback and then process the information.
--
"My software never has bugs. It just develops random features."
|
|
|
|
|
That's a whole other from the HTM form should end in . I worked with the code a little last night and fixed a lot of errors, but from what I understand they had nothing to do with the asp file retaining my info and displaying the information.
|
|
|
|
|
Oh, it looks like I completly misunderstood your problem. Your code is classic ASP, not ASP.NET, right?
In that case I'm affraid I can't help you as I have very little experience with it
--
"My software never has bugs. It just develops random features."
|
|
|
|
|
deflinek wrote: Oh, it looks like I completly misunderstood your problem. Your code is classic ASP, not ASP.NET, right?
In that case I'm affraid I can't help you as I have very little experience with it
Oh I seriously did not noticed the .NET. I'm apologize for posting on the wrong forum. If I could get a mod tom move this to the right section this would be great. Thanks for trying to take on my problem. I'm still trying to figure this out lol.
|
|
|
|
|
how to fetch in linq to sql server
soumyashree sahoo
|
|
|
|
|
|
hi guys. im kinda new here. so please help me on my first web page using asp.net.
i cant figure out to insert an image into a table please help
|
|
|
|
|
Well, you need to design a webpage where you place a table and then image in one of it's row/column.
Example:
<table>
<tr>
<td>
<asp:Image ID="myImage" runat="source" ImageUrl="~/MyPicture.png" />
</td>
</tr>
</table>
|
|
|
|
|
Hi Guys,
I am loading buttons on a page load event dynamically. The buttons are added to a placeholder control on a aspx page. The problem I am having is that the dynamically created button event below (topic_Click) doesn't get fired.
Bascially, I am trying to add topics to aobjective.
Could you please help me. I would highly appreciate it.
protected void Page_Load(object sender, EventArgs e)
{
if (Session["s"] == null)
{
AddObjective();
AddTopic();
}
else if (Session["s"] != null)
{
List<Panel> list = new List<Panel>();
list = Session["s"] as List<Panel>;
foreach (var item in list)
{
AddtoPlaceHolder(item);
}
}
}
private void AddObjective()
{
Panel panel = new Panel();
Button objective = new Button();
objective.Text = "Add objective";
objective.Click += new EventHandler(objective_Click);
panel.Controls.Add(objective);
placeholder.Controls.Add(panel);
AddtoPlaceHolder(panel);
}
void AddtoPlaceHolder(Panel panel)
{
if (Session["s"] == null)
{
List<Panel> list = new List<Panel>();
list.Add(panel);
Session.Add("s", list);
}
else if(Session["s"] !=null)
{
List<Panel> list = Session["s"] as List<Panel>;
list.Add(panel);
Session.Add("s", list);
}
}
void objective_Click(object sender, EventArgs e)
{
if (Session["s"] != null)
{
AddObjective();
}
}
void topic_Click(object sender, EventArgs e)
{
throw new NotImplementedException(); =======> Problem doesn't execute
}
private void AddTopic()
{
Panel paneltopic = new Panel();
paneltopic.ID = Guid.NewGuid().ToString();
Button topic = new Button();
topic.ID = Guid.NewGuid().ToString();
topic.Text = "Insert topic";
topic.Click += new EventHandler(topic_Click);
paneltopic.Controls.Add(topic);
placeholder.Controls.Add(paneltopic);
AddtoPlaceHolder(paneltopic);
}
|
|
|
|
|
protected void topic_Click(object sender, EventArgs e)
{
throw new NotImplementedException(); =======> Problem doesn't execute
}
private void AddTopic()
{
Panel paneltopic = new Panel();
paneltopic.ID = Guid.NewGuid().ToString();
Button topic = new Button();
topic.ID = Guid.NewGuid().ToString();
topic.Text = "Insert topic";
topic.Click += new System.EventHandler(this.topic_Click);
paneltopic.Controls.Add(topic);
placeholder.Controls.Add(paneltopic);
AddtoPlaceHolder(paneltopic);
}
[code behind event handlers^]
|
|
|
|
|
if you copy and past the code from another page visual studio may change the name of the button check the the ButtonID if its correct with the code
|
|
|
|
|
You should probably tell the OP that, and not me.
The button ID has nothing to do with generating a postback to the server. In fact, you don't need the .ID attribute in code behind, it's there to support java script and css on the client side.
His problem is that he didn't generate a new event object, and just made a reference to an uninitialized event object.
|
|
|
|
|
I see here codebehind but what if on the design side button name is not "topic"
what if the button name was "button1"
thats what i am try to tell and its very possiable if you copy and past the design code
|
|
|
|
|
i m hosting a web site i want my one web page to be run on one pc only in vb.net code or javascript code
plz help me urgent
|
|
|
|
|
I do not give a rats' hair about this being urgent. I just woke up, still enjoying the first cup of coffee.
Keeping others of your website is done using a login-form. There are a lot of examples and tutorials on the internet. Alternatively, you could use certificates. But no, not in JavaScript. Anyone can download that and simply use it to log in.
I assume it's an ASP.NET website, not PHP?
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Are you running in a network i.e. do u have active directory
|
|
|
|
|
You're replying to the wrong person
|
|
|
|
|
You have already asked this in QA. And I checked my schedule, it's not urgent at all.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
You really should of put a little more thought into that question before you just blurted it out as something that doesn't really make sense. It sounded like a 10 year old wanting ice cream now.
So let now go back to elementary school here to try and figure out what you said.
1. Your hosting a website.
2. run a web page on just 1 PC only
3. you want it to be written in Javascript or vb.
Now that the translation is complete
1. If your hosting a website, then you must have the knowledge to perhaps just load that website on the 1 PC only, so it is localized, and cannot be shared with other computers. Windows Professional and Business Editions come with IIS server for local web hosting.
3. You can host, but can't write one, There are many tutorials out there that will guide you through the process of learning how to write HTML
You have to learn HTML first, before you can write any asp.net or Javascript. All you need is notepad, and a small web server to get started. The links below will get you started in an urgent manner.
http://www.html.net/tutorials/html/introduction.php[INtroduction to HTML^]
http://www.wikihow.com/Create-a-Simple-Web-Page-With-HTML[^]
|
|
|
|
|
In my page i have a grid. There ia check box column.After I select some of the records or all the records I am doing a time taking operation.I,e on button click i want do a long database operation on the selected records and also calling a separate exe which will do some operation on each record. I want to allow the user to move to a different page and do some other work and when the user again come back to that page where the long process was going on.I was trying to achieve it through async page functionality, but lster on thought thst if i move to a different page then how can i do that button click operation, because that page is no more existing. Can anybody put some idea on this. If the question is not clear then please ask me.I don't want to call a web service for this operation. Suppose I have a procedure dosomething().On button click i want to call dosomething() and can move to different page. and again come back the operation should have beeen finished. I have a label on the page which will be updated with the text as operatuin completed successfully or some error message. I will be greatful to you please put your idea on this. with some little code sample.
|
|
|
|
|
Well someone correct me if I'm wrong here,
If you change pages, then the process will continue to run, until the server is alerted that the user is no longer on that page, so when the answer is ready, that page won't be there anymore to receive the answer. It will have destroyed the old page, and moved on to the new page with complete disregard for the old page.
When the request is made, the server will send back a success code, and the browser will wait for the html stream, or response stream.
In order to send small amounts of html back to the page while waiting, you have to put something in the response buffer, and dump the buffer back to the browser, so it will not timeout, until your main response buffer is ready to complete the process.
If you use an iFrame, that's like splitting a browser into 2, in which several processes can run at the same time to different servers.
But in hind sight, if you can't write code for the response buffer, to send html every 10 seconds or so, then the whole thing will timeout on you.
|
|
|
|
|
Hi jkirkerx
Thanks a lot for your suggestion. Actually I am a desktop application developper. In windows application normally I use threading for this kind of requirement.I am very much new to web development.So I thought, is it really posible to do something like this.
Thanks
Prashant
|
|
|
|
|
I went the other way around, wrote vb windows programs in the 90's, then took up c++ last year to write windows programs.
I think you can run multiple threads in asp.net on the back end, but that's not going to help you.
In essence,
Each web page is an independent program, that has no knowledge of other web pages, so data has to be reloaded every time, with only a querystring or session value as a key to the data.
One single page can run like a windows program, using small calls to the server called ajax, to a web service that will return the data.
All the code, HTML is held in the heap, refereed to as the DOM, by the browser and can be manipulated using javascript, in which you can change elements or html on the fly on the client side.
Sorry I made fun of you, thought you were a newbie.
I would write a c++ program, that you load via asp.net, and have it do the work and write a file to app_data, and check for the existence of that file, and use asp.net to read the bytes, parse, load and present the results. it's just like c++, not much difference.
|
|
|
|
|
If you are using SQL Server, maybe you could have a "JOB" configured and your page would simply pass arguments to the job and tell it to start. The SQL job will execute asynchronously and your user is free to do whatever they want.
You could get fancy and have another page which would show the status of the job to the user. The job itself you email the user when it is compltete.
More info on SQL jobs ...
http://msdn.microsoft.com/en-us/library/ms187880[^]
Just a thought.
|
|
|
|
|
That's a good idea.
How about just writing a complete html file to app_Data by session number, and on every page load, check for the existence of the file, and read the contents of it, and load it up in a panel for display.
Write a worker service dll in c++ that does the whole thing, the web page calls it, it runs in the background, and writes out a html file in the app_data when complete.
Now ideas are flowing here.
|
|
|
|