Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

 

Basically, I am trying to pass some information from my database (which I am accessing in my code behind) to a Iframe Edit Control in my HTML and Javascript code. How do I pass information between these?

 

I know how to access the database no problem in the code behind, and how to put information into the Iframe Edit Control in my Javascript... but i dont know how to pass info between them. I presume its through a global variable or something?...

 

<Script Language="javascript" for="DesktopText" event="onload">

DesktopText.document.body.innerHTML = ''

</Script>

 

...with putting my global variable (which i would fill from the database in my code behind) at the end of that line.

 

CAN ANYONE HELP?

 

I am using Visual Studio.net and im working in an .aspx.

 

Cheers,

Stu.

Posted

HTML Table!

 

A html table! ... i am making a WYSIWYG HTML editor thingy.

 

I have got actually now got it kind of working for passing the data in... what i did was declare a public variable in my code behind, then filled it with the data, and then place it in the table using <%= VARIABLENAME %> in HTML/JAVASCRIPT view.

 

However, what I am now really stuck with .. is how to get the contents back out again and into a variable that I can once again use in the code behind so that i can save the new contents.

 

obviously doing something like...

 

<%= VARIABLENAME %> = 'my new content'

 

... is not going to work. Any ideas????

Posted

Any ideas?

 

I have just read what i put and its not that clear...

 

I have now actually got it kind of working for passing the data in (from the database)... what i did was declare a public variable in my code behind, then filled it with the data (from the database), and then placed this content in the IFRAME using <%= VARIABLENAME %> in HTML/JAVASCRIPT view.

 

However, I dont know how to get it back out again... ie. I dont know how to refer to the IFRAME from the code behind?

 

OR alternatively I dont know how to fill a variable from the HTML/Javascript that can then be used in the code behind to populate the database.

 

If it is not clear what i mean... basically I have now got my content in the IFRAME on screen and I want to save the contents to a database (the code for doing this is in my code behind).

 

Any ideas how to do this?

 

Stu.

Posted

Form Field

 

Ok,

 

I have had a look at QueryString and Form Field. Form Field will be a much better option for my problem.

 

However, assuming that I have got my data in a hidden form field, how do I access this information from my Visual Basic Code Behind in ASP.NET? as that is where the code is to stick the passed information in the database.

 

Is it to do with posting the form to itself? or how? whats the easiest/best method?

 

Cheers,

Stu.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...