How do I make link to website from today screen? - General Topics

I am using Wisbar Advance Desktop and I am making my own weather page. What I want to do is put a button at bottom of page that says "RADAR" and then when you click on the button I want it to automatically launch my browser and go to a website that I found where they have animated weather radars right on there homepage. I know how to make the buttons and all that stuff and how to link them up. I just don't know how to make a bookmark that will automatically launch when clicked on. Would it be anything like making a link to a program where you write the command in notepad and then just save it out with a .lnk?
Also, is there a way to define which browser it uses. I have Opera 9.5 and Skyfire. In opera I have the box checked where it says use as default browser, so will it use Opera? I definitely don't want it to use dirty old PIE.
Thanks for any help you can give. I would really appreciate it.

I had this problem, and the solution I used is HTML redirect.
point your button to an HTML page on your device that has the following code:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Your Page Title</title>
<meta http-equiv="REFRESH" content="0;url=http://www.the-domain-you-want-to-redirect-to.com"></HEAD>
<BODY>
Optional page text here.
</BODY>
</HTML>
of course, you need to replace
"www.the-domain-you-want-to-redirect-to.com"
with your URL
If it doesn't default to the browser you wish to use, them you might try creating a shortcut with the redirect.html as a parameter like this example:
24#"\Windows\Opera.exe" "path\redirect.html"
Good Luck!

Related

[Q] Today plugin containing info scraped from a web page?

Given that there is a page on the internet that if you hit it returns something like the following HTML:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Refresh" content="60"/>
</HEAD>
<BODY BGColor="0">
<BODY LANG="en-US" DIR="LTR">
<p><strong><font color="#FF0000" size="4">Please go to the XXXX Beta Forums
by clicking here
, and read the information posted there.</P>
<br><br>
<p><strong><font color="#FF0000" size="3"> Server Status for testers: <font color="#FFFF00" size="3">OFFLINE</p>
<p><strong><font color="#FF0000" size="3"> Server Status for GMs: <font color="#FFFF00" size="3">OFFLINE</p>
<p><strong><font color="#FF0000" size="3"> Server Status for master GMs: <font color="#FFFF00" size="3">OFFLINE</p>
<p><strong><font color="#FF0000" size="3"> Server Status for Admins: <font color="#FFFF00" size="3">OFFLINE</p>
</BODY>
</HTML>
This renders looking like:
Code:
Please go to the XXXX Beta Forums by clicking here , and read the information posted there.
Server Status for testers: OFFLINE
Server Status for GMs: OFFLINE
Server Status for master GMs: OFFLINE
Server Status for Admins: OFFLINE
Does anyone know of a today plugin that would be able to display the page, plus, ideally:
1) Obeys the refresh command in the HTML to refresh the server status, or refreshes every 60 secs or so itself.
2) Be able to reformat the output, removing superfluous the "please go to the forums" line and just leaving the four status lines, maybe removing the spaces between the server lines to condense it.
I was maybe thinking flash? I can code, but I have never used flash. What I would really like would be something that can take the information and present it in a prettier format - icons and whatnot.
Sorry, I cannot give out links as I am under NDA.
OK, I have an idea.
Mortscript can be used to pull pages and perform string manipulation on the returned HTML.
The data could be extracted and placed into registry keys
Then use XIAMultiTheme to pull the info from the reg keys and make it a today plugin.
Sorted!
1. Something "like" this exists... and is old. i don't know the name of the app but you should start searching the forum for it... i found it here like a half a year ago.
2. If you're thinking about flash, i suggest you look for FEWidget's thread for widget creation. suggest a creation of a web widget, I'm almost positive someone would create one.
Yeah, I was thinking FEWidgets might be a contender, but ideally I wanted to have it as just a small strip in the regular today screen as I use that (XMT and UL).
I have a prototype working now with XMT and MortScript.
Cool, when you're done with it i'd appreciate if you posted it here so i can use it in my internet tab in UL.
also, creation such a widget in flash would be very very useful as you have many options to deal with web using flash... much wider option-ed than Mort.

I've managed to enable copying text from Opera Mini on ALL mobile platforms!!

As has been pointed out in all of my articles dedicated to the excellent, lightweight browser Opera Mini, in addition to the lack of italic characters, probably the biggest problem with it has always been the lack of support for copying text from a Web page.
Now, this is fixed. While the way I've enabled copying is certainly inferior to the excellent copy capabilities of Teashark (see THIS), it's certainly working and, at last, enables anyone to copy anything out of any Web page, regardless of the platform you use. Yeah, it IS revolutionary.
How it works? Pretty easy: I've created a Web application that you need to pass the address (the URL) of the page you'd like to copy contents from. After entering (copying) the address, it presents you the contents of the page in a text area, which is already copy-enabled; that is, you can copy anything from them to your device's clipboard.
As mobile devices, in general, are only able to handle small(er) chunks of text in a text area, the dialog you're presented uses 2000-char-long chunks of text. You can easily switch between the block you're reading by just clicking the appropriate block link (0, 1, 2 etc.) There's also a way to force the application to display the entire page at once; note that, with pages over 10-15 kilochars, this may result in Opera Mini's slowing to crawl. That is, use it if you're absolutely sure your particular model / operating system lets for putting larger texts in an editable text area.
Now, let's see how this all works in practice.
1. add the Web page http://menneisyys.s156.eatj.com to your favorites in Opera Mini (the easiest way of doing this is reading this article in Opera Mini and clicking the link)
2. when you're on a(nother) page you'd like to copy something from, copy the address of the page you'd like to copy text from to the clipboard of your device. This needs to be done in the following way:
a. on Windows Mobile Pocket PC's (but not touchscreen-less Smartphones, where you need an additional app for copying):
a-1: press #1 (if your phone has a hardware dialpad) or go to Menu (left softkey) / Enter Address
a-2: If you haven’t disabled the new auto-completion address input field (the Auto-complete address input checkbox in Settings), press Down and go to Insert symbol… by pressing Up; and select it; you’ll be taken to the address input field of your Java environment. (You’re taken straight here if you disable the new, Opera Mini-specific address input field.)
a-3: select Menu (right softkey) / Current Address
a-4: As you can see, the address of the current page is displayed. Just copy it: highlight it entirely (under Jbed, to do this, click Shift, Ctrl and, finally, the left arrow on the on-screen keyboard) and press Ctrl-C on the virtual keyboard.
b. on Blackberry phones:
b-1: press #1 (if your phone has a hardware dialpad) or go to Menu / Enter Address
b-2: If you haven’t disabled the new auto-completion address input field (the Auto-complete address input checkbox in Settings), roll the trackball down, and, then, up, until you get to Insert symbol…. Now, you'll be taken to the address input field of your Java environment. (You’re taken straight here if you disable the new, Opera Mini-specific address input field.)
b-3: press the Shift button and roll the trackball down until the entire (current) address is selected
b-4: press Menu and select the (default) Copy.
b-5: to exit this dialog, press Back twice.
3. now that you've copied the address of the current page, switch to the previously (in bullet 1) stored page. When it loads, copy the URL of the previous page (the one you'd like to copy text from) to the "Enter the URL to convert" textfield. To do this, start editing the field and,
- on Blackberries, press the hardware Menu button and go down to Paste.
- on Windows Mobile devices, bring up the virtual keyboard and click Ctl, and, then, V
- on Symbian devices, long-press the Pen button until "Paste" is shown over the right softkey. Not releasing the Pen button, press the right softkey.
After some conversion, a new page is displayed, with a huge text area displaying the textual contents of the Web page. If the contents of the page is longer than 2000 characters, only the first 2000 is displayed (not to overburden the phone) and you can select the later ones by clicking 1, 2, ... n at the top of the page. You can also make the system display the entire content entirely, without cutting it in chunks, by clicking the "Click here to see the entire page!" link. Again, use this feature with caution - again, your phone may slow to a crawl, if the midlet manager's text area component is able to edit so huge blocks of text at all).
Finally, if you absolutely don't see anything and/or you'd like to see the entire markup of the page, click "Click this to switch to tag-enabled mode if you don't see anything".
After you've stepped into editing the text area displaying the (given chunk of) text, just look for the expression / URL etc. to copy to the clipboard. Once you've found it, highlight it and copy to the clipboard. This operation is supported on all the major smartphone operating systems and done in the same way as copying the address of the current page to the clipboard.
Hosting
Currently, the converter is hosted on a free JSP server that needs to be manually restarted every six hour (to force people to purchase a real Web package). That is, when you do check it out, it might not work at all. I will surely move it to another page / service provider if I don't find anyone else to voluntarily host it, depending on the price / conditions. (Currently, I don't really need a JSP/PHP-capable Webpage and, consequently, I've only subscribed to a static one for my database/picture/file back-end at http://www.winmobiletech.com/ ; this is why I can't currently host it myself.)
If you have the bandwidth and you'd like to help Opera Mini users, feel free to host the files yourself. If you have a JSP engine (Tomcat et al.), you'll find the web application (WAR) file HERE. If you only have a PHP or ASP engine, and don't want to struggle with porting the Java app into PHP or ASP, let me know and I convert it instead.
Source
The source of my converter is really-really small. The two, related files HERE and HERE, should you want to know how it works. The first is the main "landing" page you need to paste the URL to paste text from (it's a static HTML page as there is no need for any dynamic content in it); the second is the actual JSP page doing the work.
I've updated my eatj.com account: subscribed to a one-month plan (for $10). Now, the service should start working in 12 hours. There will be no pauses from now on. Feel free to use the service - and don't forget to provide me feedback on what you would welcome.
Also free to provide me with commonly visited pages (CNN etc.) that you think I could provide a more sophisticated engine - for example, only displaying article text and not displaying other stuff.
All in all, feel free to (publicly! NOT IN PRIVATE MESSAGES, they will all be ignored!) ask me to provide new functionality and/or site-based custom processing.
UPDATE:
In the meantime, based on public feedback (see selurus' and yitzy's requests on Wednesday, 3. June 2009, 18:13:35 and 23:30:15, respectively, at http://my.opera.com/community/forums/topic.dml?id=277592&t=1244154046 ), I've added the following two front-end pages:
http://menneisyys.s156.eatj.com/i2.html : if you paste the source page URL to this page, you'll be presented by all blocks in order. This way, you'll see (based on the text already visible in the beginning of each textarea) right away in which block you need to look. selurus reported it caused no slowdown on his handset; your mileage, on other handset models / operating systems may vary. That is, if you don't need this kind of breakup and/or it causes too much slowdown and you're sure you can find a given part of the text faster using the traditional links, use the first version instead. (Feedback is welcome!)
http://menneisyys.s156.eatj.com/i3.html : this displays UTF-8 pages properly (most oriental languages like Chinese / Japanese; Hebrew etc.). I've tested it with http://www.haaretz.co.il/hasite/spages/1090414.html (Hebrew) and http://fi.wikipedia.org/wiki/Romanit (Finnish; check out the letter "ž" in word gudžarati after "urdu, hindi, sanskrit ja"). NOTE: it's for UTF-8 source pages ONLY. Do not try to decode e.g. East-European languages using 8859-X with it. I plan to release a version compatible with these traditional, 8-bit encodings as well when I have the time so that charset setting becomes automatic.
As you can see, these front-ends 1. offer an alternative view (displaying the content of the entire page in multiple text areas, keeping in mind the text area editing limits) and 2. allow for copying from UTF-8-encoded pages.
------------------------------------------
Also in the Opera Mini Community forum, there's a nice tip posted by Yeswap: use "bookmarklets" to speed up invoking the converter. To do this, do the following:
1. from Opera Mini, go to http://o.yeswap.com/
2. click Tools or scroll down to Tools
3. click Copy Page Text
4. (seemingly) the same page reloads; NOW bookmark it as a standard bookmark (Menu / Tools / Add Bookmark or #7 if you have hardware buttons). However, don't save the bookmark yet - just open it for editing!
5. remove "http://o.yeswap.com/?" from the URL so that it becomes javascript:location.href='http://menneisyys.s156.eatj.com/om.jsp?q='+encodeURIComponent(location.href)+'&blocknr=0'
6. now, you can already save the edited bookmark.
7. you can quickly invoke the new bookmark: when you're on a Web page you'd like to copy to the contents to an editable text area (so that you can, later, copy text from), just go to your bookmarks (Menu / Bookmarks or, if you have hardware keys, #2) and click the just-added "Copy Page Text" entry. You'll be immediately taken to the target page - that is, no manual URL pasting is necessary any more! As you can see, this has really made all this very simple.
Note that you can safely change "om.jsp" to either "om2.jsp" or "om3.jsp" in the URL you bookmark (so that it becomes javascript:location.href='http://menneisyys.s156.eatj.com/om2.jsp?q='+encodeURIComponent(location.href)+'&blocknr=0' and javascript:location.href='http://menneisyys.s156.eatj.com/om3.jsp?q='+encodeURIComponent(location.href)+'&blocknr=0', respectively), should you want to have a direct link to the two new, alternative pages (display all the pages and use UTF-8) I've just added.
Also note that, strictly, you don't have to go to http://o.yeswap.com/ to add the bookmarklets. You can do the same by adding a new bookmark with the above contents (e.g., javascript:location.href='http://menneisyys.s156.eatj.com/om2.jsp?q='+encodeURIComponent(location.href)+'&blocknr=0' ). Also, you can name your bookmark anything - not strictly Copy Page Text.
I've implemented PDF support.
After a lengthy and careful evaluation of the current Java libraries used for PDF parsing, I've decided to choose Adobe's own one.
To use it,
1. navigate to http://menneisyys.s156.eatj.com/pdf.html and paste the URL to the PDF there.
2. if someone else has some seconds ago checked translated the document, you'll be presented its textual contents, in the usual multiple text areas (see http://menneisyys.s156.eatj.com/i2.html ) right away.
3. if it's the first time in the last few seconds that the document has been converted, you'll be dispatched to Adobe's page. After some 10-20-30 seconds of waiting, the conversion is finished and you'll be shown the textual version of the page.
4. NOW, just press Back until you get back to http://menneisyys.s156.eatj.com/pdf.html . Press the Submit button again. Now that it was just some seconds ago that you made Adobe convert your document, you'll be presented it, already in the text areas.
It's a bit convoluted but "hiding" the Adobe interface and make it even easier would have taken me too much time / effort.
Hope you'll like it
Thank you for all you useful information!

fexplore folder shortcut with Icon View

I have a shortcut that brings up my ebooks directory in the traditional fexplore list view. What I want to know is if there is any command line argument I can use to make it show up in a more finger (and eye) friendly Icon View, like that which occurs if you do start -> Programs.
I found another post asking this question, but no answers. Thanks for your time.
a friendly and hopeful bump
Sure,
take a look into my thread;
http://forum.xda-developers.com/showthread.php?t=623195
There are links to other pages with lots of nice applications/utilities.
There are new utilities (yet not made by me though).
Within it is the basics of making your own shortcuts.
Within it is the basis of adding your own icon.
or *.icl icon library..
Now and then I'm still updating (editing) it. I'm looking into two *.icl files, where I need to find out if I can share 'm here (that is within the above link).
IMO this is a nice start fortunz
Senax
I do appreciate the info (which I've bookmarked for other uses), but I didn't notice any Icon View parameters for fexplore in the post. I'm not really interested in altering what icon the .lnk has, I'm just looking to avoid the default List View fexplore uses.
My googling on the issue has also been a complete failure. I've been assuming that Start -> Programs (sans manila, I don't know if it uses the same setup) on vanilla 6.1 uses fexplore in an Icon View, but I suppose it could be using a different program entirely to browse the start folder.
Another approach
Use Opera instead
Goto the url: file://localhost/ Browse for your preferred directory, bookmark it, make a link (*.lnk) for this bookmark and put this link on your application launcher. You could also copy and paste it into another browser (with better/other view capabilities).
Just a thought,
Senax
Senax said:
Use Opera instead
Goto the url: file://localhost/ Browse for your preferred directory, bookmark it, make a link (*.lnk) for this bookmark and put this link on your application launcher. You could also copy and paste it into another browser (with better/other view capabilities).
Just a thought,
Senax
Click to expand...
Click to collapse
It's an interesting approach. Not quite up my alley having tested it out now, but I do appreciate the thought.
Since fexplore parameters seem to not be known, perhaps I should be looking for another file manager to use for these particular purposes.
fexplore free alternative
Hello again,
IMO I found it! I have it under the hood for ages, maybe that's why I did not think of it in the first place ; start using the free ware Total Commander file manager. Set it in it's Menu to Show - Large Icons
Done!
Senax
What you need is File Explorer Extensions
http://forum.xda-developers.com/showthread.php?t=421723
You can switch between big icon and detailed view, but not using command line.
And
http://www.vijay555.com/?Releases:VJSmallIcons
Can get command line parameters, but only for program menu (WM 6.1 and below)
Senax said:
Hello again,
IMO I found it! I have it under the hood for ages, maybe that's why I did not think of it in the first place ; start using the free ware Total Commander file manager. Set it in it's Menu to Show - Large Icons
Done!
Senax
Click to expand...
Click to collapse
Does it always default to showing large icons thereafter (Every time you open the program again after it's been shut down completely), or do you have to change it each time?
If not, I see at least one element in the ini file that might make the setting keep. Thanks. I'll give that a spin.

Opera Mobile 10

I just downloaded the browser which is a HUGE improvement compared to the previous Opera built-in version.
The thing is that I'd like it to make the default browser; understand the browser that would launch in the TouchFlo menu. The installation did proposed to make Opera 10 the default browser but it didn't work.
How could I achieve that ? In addition, I'd like to remove the old version of Opera, if possible...
Thank you !
Does it support the Zoom-bar ? if does , then share the link ;]]
No it doesn't indeed. That's two fixes now...
I tried pretty much everything that was proposed in a "Make Opera 10 the default browser" found here, but nothing worked...
did you try M2DC
Registry settings to change default internet browser
Hi,
Here is the values to change default internet browser
HKEY_LOCAL_MACHINE\SOFTWARE\HTC\Manila2D\InternetWidget
Type-Value name-Value
String (Default) (value not set)
DWORD IncludeUserFavorite 0x0
String RunCmd \Program files\opera mobile 10\opera10-armv41.exe
DWORD WebBrowserType 0x1
You can use any registry editor.
ok, i pefer the Opera mini 5 i have found it that its faster than the default one or the Opera 10.
Now when i try to do the reg edit, i reach the point where you said
\
HKEY_LOCAL_MACHINE\SOFTWARE\HTC\Manila2D\InternetW idget
now, after this i did not understand clearly whats the next steps..
can you be more specific please?
it is a table (rows/columns). first line is table head
I downloaded M2DC from here (xda) and in the "Internet" tab searched for the .exe of the Opera 10.

[Q] web app

Hello,
I dont know if the title fits, so i gonna explain my Problem.
I want to Programm a Game With User Login. Sadly wp7 doesnt Support SQL api, so i cant make the User Management directly over sql.
So i got a Website with a working Login Formular. I want to link the wp7 textboxes with the textboxes of the Website which works with SQL.
Is there a simple way to get this working? Or does anyone have a better idea to get my User Management working?
Greatings win99
Sent from my HD2 using Board Express
Hmm... I can only suggest you to learn how to do http requests (and general programming of course). I hope u'll stop thinking in terms like "linking textboxes"
yeah, "linking" is maybe the wrong word
What exactly do you mean with "http request"?
I can program a bit html an php, which i could include in a "WebBrowser" control. This way i could use php with mysql, but i don't want to make a browser game.
Is there somethink like a "http database"? Cause i don't know yet any database based on http. And is there an API availible to do this requests from a panorama app?
Sorry for this basicly questions, but i'm just a hobby programmer and since now i just programme windows desktop projects, where i could easily use SQL.
Your "very basic question" requires a very long answer (sorry, but I don't have enough time. Also, I'm not an expert in SQL http communication). FYI, all communications between web page (and you can treat your WP7 page as a web page) and SQL server based on HTTP POST requests (but of course not on "linked textboxes"! ). So, try to google with words such as "WP7 SQL HTTP POST" - first five links possible will have all info you need (but you should understand "how everything works" first!)
ok, if i understand it correctly, this sound like instead of using "app<->SQL" i should use "appy<->http<->sql".
i will try to find some good tutorials and reply on success/ no success.
win98 said:
ok, if i understand it correctly, this sound like instead of using "app<->SQL" i should use "appy<->http<->sql".
i will try to find some good tutorials and reply on success/ no success.
Click to expand...
Click to collapse
Well, from the sounds of it, I am going to assume you networking and web API knowledge and maybe decent enough MySQL/SQL/Database knowledge, and possibly somewhat new to WP7 C#.NET (Don't take this personal or a lashing towards you, not the case, I mention it so I can be basic and to the point without assuming you know what references I make or offend you).
If you want an "out-of-the-box" easy solution, let's stop and go download RestSharp (http://restsharp.org). After you get it, visit: https://github.com/restsharp/RestSharp/wiki/Getting-Started, as this will give you a great example of HOWTO use this solution.
You also need to remember about the footprint, a 90MB limit (Max) on 256MB phones. Too big can cause some issues.
Also, another good option is SQLlite, probably one of the most popular, straight forward and well respected (I even use it on some projects). Should you choose to use it, go to http://sviluppomobile.blogspot.com/2010/07/wp7-sqliteclient-preview.html and read his Blog post, VERY informative and a Sample available for you to learn from as well.
If you really wanted to do this yourself, you could create an HTML page and do all your coding in it (e.g. Login Box) and use JavaScript as well, this way you grab the contents from your textbox(s) and send to the embedded web browser you load the HTML page in, hence scripting is available for WP7 but must enable scripting support and highly recommend to use IsolatedStorage and can invoke JS just as easy as:
window.external.notify("(Task)Param)");
So this should hopefully get you to where you want to be but if any of the above statement I made was true, I recommend out-of-the-box solutions for you.
Thanks,
Lance
lseidman said:
If you really wanted to do this yourself, you could create an HTML page and do all your coding in it (e.g. Login Box) and use JavaScript as well, this way you grab the contents from your textbox(s) and send to the embedded web browser you load the HTML page in, hence scripting is available for WP7 but must enable scripting support and highly recommend to use IsolatedStorage and can invoke JS just as easy as:
window.external.notify("(Task)Param)");
Click to expand...
Click to collapse
This is the way i planned to do it. How do you call it? For me it is hard to find a tutorial or book or something like that, cause i don't know which keyword to google
thanks anyway
win98 said:
This is the way i planned to do it. How do you call it? For me it is hard to find a tutorial or book or something like that, cause i don't know which keyword to google
thanks anyway
Click to expand...
Click to collapse
First and foremost, I appreciate your honesty which is why I will basically show you the way...
Well, if you wish to invoke JavaScript via WP7 you can, like below:
1). Open your Mainpage.xaml and find the grid and insert:
<phone:WebBrowser HorizontalAlignment="Left" Name="webBrowser1" VerticalAlignment="Top" Height="xxx" Width="xxx" IsScriptEnabled="True" ScriptNotify="webBrowser_callback" />
2). Make an HTML page, go in the HEADER section and type something like: "<SCRIPT LANGUAGE="JavaScript" src="HelloWorld.js"></SCRIPT>" and add a button that has a function to fire upon clicking + name the section like:
<h1 id='myName'>Hello World!</h1>
<form>
<input id="button" type="button" class="button-standard" style="width:200;height:100" value="Hello World!" onClick="HelloWorld()"/>
* Remove the Quotes from above...
3). Make a file called HelloWorld.js and put in something like:
function HelloWorld() {
window.external.Notify("Name");
}
function sets(val) {
document.getElementById('myName').innerHTML = val;
}
4). In your Mainpage.xaml.cs, find where you want to invoke the script/site and put in:
webBrowser1.Navigate(new Uri("http://lance.compulsivetech.biz/login", UriKind.Relative));
*Change the URI to your address, not my blog's fake login...
5). Since we are loading the site locally in Isolated Storage, go forth and type this in:
private void CreateDirOnStore(string strDir)
{
// Create a directory for local storeage.
IsolatedStorageFile isoStore = IsolatedStorageFile.GetUserStoreForApplication();
if (!isoStore.DirectoryExists(strDir))
isoStore.CreateDirectory(strDir);
}
private void SaveFileToIsoStore(string strFileName)
{
// This will save the file to the isolated storage based on the string provided.
IsolatedStorageFile isoStore = IsolatedStorageFile.GetUserStoreForApplication();
//remove the file if exists to allow each run to independently write to
// the Isolated Storage
if (isoStore.FileExists(strFileName) == true)
{
isoStore.DeleteFile(strFileName);
}
StreamResourceInfo sr = Application.GetResourceStream(new Uri(strFileName, UriKind.Relative));
using (BinaryReader br = new BinaryReader(sr.Stream))
{
byte[] data = br.ReadBytes((int)sr.Stream.Length);
//save file to Isolated Storage
using (BinaryWriter bw = new BinaryWriter(isoStore.CreateFile(strFileName)))
{
bw.Write(data);
bw.Close();
}
}
}
6). In your public MainPage() put:
this.Loaded += new RoutedEventHandler(Load_WebPage);
* Always put stuff after your Intialize call
7). We need to make a page load function as below (in xaml.cs):
void Load_WebPage(object sender, RoutedEventArgs e)
{
//Set the start folder of the widget and navigate to the start page
CreateDirOnStore("helloworld");
SaveFileToIsoStore("helloworld/index.html");
SaveFileToIsoStore("helloworld/helloworld.js");
webBrowser1.Base = "helloworld";
webBrowser1.Navigate(new Uri("index.html", UriKind.Relative));
}
8). Now we invoke the function as seen below:
void webBrowser_callback(object sender, NotifyEventArgs e)
{
//Use invokeScript to give to the web env.
webBrowser1.InvokeScript("eval", new string[] { "sets('txtName.Text')"});
}
Hope this helps, this is basically off the top of my head but should be pretty close to being right and Mango Compat.
Creating a WCF services that calls SQL will be the quickest way...about 30 minutes.

Categories

Resources