|
I have a webpart that displays the current weather using a zip code. Currently user has to provide zip code every single time the page loads. I wanted to save the zip code provided by the user so that my webpart can display the weather withouht user input.
Would it be best to save the zipcode under user profile? Or does webpart save their information somewhere else?
Thanks.
|
|
|
|
|
robert110 wrote: Would it be best to save the zipcode under user profile? Or does webpart save their information somewhere else?
The WebPart can handle this by persisting the user input in its own personalization table, you can see the sample code from here[^].
http://msdn2.microsoft.com/en-us/library/z36h8be9.aspx[^]
|
|
|
|
|
Hi,
I'm writing a web server to retrieve images and loops from a database.
Since those objects are not standard multimedia format, I want to convert them on the fly to jpg or avi basing on some params.
To do this I have an isapi filter that in case of the right header, send the requested object in the requested format.
I'm using an img tag in my asp page and the source is dynamically set as another page of the webserver that grabs the params and fires the isapi putting the header.
What i need is to cache the responsed object in such a way I don't need to redo everything in case of reclick.
Thanks
|
|
|
|
|
Hi,
I have the problem of refreshing opening window with server side handling. I have 3 windows; window 1 (file 'CourseSettingPopupFrame.aspx') on it has a javascript button to open a window 2 (file 'EvaluativeEditCommentsPopup.aspx'). Next, window 2 opens window 3 (file 'EvaluativeEditCommentOfManyCourses.aspx') by also using a javascript button. The 3 windows are opened in their own or separate windows. On window 3, I use a server-side asp.net button called "OK" to save data users enter on it after the button is clicked and the button's event handler looks like.
private void btnOK_Click(object sender, EventArgs e){
// do some stuffs
...
// Execute database to save entered data
...
// refresh window 1; close window 2 and window 3 using client-side javascript codes
Page.RegisterClientScriptBlock("msc",
" "
+ " var url = 'CourseSettingPopupFrame.aspx?SessionID=" + Request["SessionID"] + "&SYTermID=" + requestedSYTermID + "&SYCaption=" + SYCaption + "';"
+ " window.opener.opener.location.href = url; " // refresh window 1 with newly user-entered data from window 3
+ " window.opener.close();" // close window 2
+ " window.close(); " // close window 3
+ " </" + "script>");
}
*** The PROBLEM is, for the first time when window 3 and window 2 are opened and the data is saved to database and window 1 hence is refreshed by code segments above, it is OK to refresh window 1. However, if I hit button on window 1 to open window 2, and then window 3, and users enter or change data on window 3 and save, and refresh window 1, then the refreshing process this time causes window 1 freezing or keep doing something (like deadlock) or the mouse cursor has the shape of a clock, that means something keeps doing doing and other web window who opens window 1 is frozen and I must close IE on my computer to start over the application.
Do you guys have any ideas about this problem and how to solve it?
Thanks in advance.
<div class="ForumSig">johnaspnet</div>
|
|
|
|
|
Hi,
This has been bugging me for a while now
I'm trying to save a date value into SQL2000 DB. It keeps on throwing this Exception Error:
System.FormatException: The string was not recognized as a valid DateTime. There is a unknown word starting at index 0.
I have been researching how to parse this datatype, but the sites I have been to have not been user-friendly. If you know a good site, or a suggestion or even sample code, please let me know.
Thank you in advance!
EDIT P.S. I would like my date to be inputted in this format (dd/mm/yyyy) into a textbox.
|
|
|
|
|
Are you passing a DateTime, or a string to the database ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Thanks for replying,
I'm passing a string to the database.
|
|
|
|
|
OK - why ? You're surely not storing a string in the database ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi,
Sorry for not posting earlier, I was unable to load this website on my PC for days for some reason.
The problem is sorted. Even tho I was storing a date in the database, I had to format it into English format.
Thanks for your replies. I'm sure there are many ways to do this.
Take care.
|
|
|
|
|
hello there
i have problem
i made a sitemap file and include in it some nodes which it`s url had querystring
like that
[SiteMapNode title="mypage" url="MyPage.aspx?id=1"]
when i bind this file to SiteMapPath control the sitemappath doesnot appear in "MyPage.aspx" the page that i include in it`s node querystring
anyone can help please
|
|
|
|
|
I am studying about securing web services and have done a few examples of them but I am having trouble finding information about why securing them is a good idea. I am also wondering how it actually works. Does it limit how many users can access a web service or does it prevent people from hacking into the service without using a specific client app. Any links to websites or an explanation would be wonderful.
Thanks!
Brett A. Whittington
Application Developer
|
|
|
|
|
bwhittington wrote: I am having trouble finding information about why securing them is a good idea
I'd have thought that would be self evident. Imagine a webservice that provides access to payroll. Should that be easy, or hard to gain access to, assuming you don't have permission ?
bwhittington wrote: I am also wondering how it actually works
Microsoft's Web Service Extensions ( aka WSE ) provide security enhancements, if you google WSE, I'm sure you'll get heaps of info. The current version is 3.0.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi
I have a combo box and i want to get the previous selected index i.e. the index prior to the current selected index. For e.g. i have a combo box with some values like 'Red', 'Silver', 'Green', 'Blue'. If i select the value 'Red' from the combo box and then 'Green' and then 'Silver', then i want to get the prev index value i.e. 'Green' becoz the current selected value is 'Silver'.
This is very urgent, plz tell me the solution.
Thanks
Riz
|
|
|
|
|
if you are using ComboBox control then your post should be in C# board
cmb.SelectedIndex = cmb.SelectedIndex +1;
|
|
|
|
|
You'll need to store the selected index every time it changes (either through javascript or on post back). The control is not stateful and keeps no record of what it used to be.
|
|
|
|
|
Hey,
It would be of great help if u wud give me the code of the javacsript.I am new to javascript.I want to implement that concept in my ASP.Net Application. It wud be nice if u cud provide me the solution.Atleast the link to that code.
Thanks,
Riz
Riz
|
|
|
|
|
Something like:
var lastIndex; //declared 'globally' on the page
var currentIndex; //declared 'globally' on the page
function CallThisWhenIndexChanges()
{
lastIndex = currentIndex;
currentIndex = document.forms[0].listBoxId.selectedIndex;
}
Then you'll need to do whatever else it is you need with the last index.
|
|
|
|
|
I have a big problem updating ASP.NET 2 sites. Someone please refer me to an article about updating ASP.NET 2 sites. Or tell me here.
What should I do when I want to update the site. I previously pubished the site and replaced all page assemblies and form files which is a time consuming action. I need an urgent help please.
|
|
|
|
|
Check out my most recent artical. I think it will help some...
Click Here[^]
|
|
|
|
|
Sir/Madam,
I have two problems.
1.Can i have more then one web.config file , if the answer is yes then
How we shall get to know which web.config file is presently active.
and if more then one web.config file can reside in one application,
then can they be placed in same folder?
2. What is the meaning of x in aspx file.
Please explain.
Thanks
|
|
|
|
|
amaneet wrote: Can i have more then one web.config file
yes, you can have one per folder - it is often used to limit permissions on a per-folder basis
amaneet wrote: can they be placed in same folder
Obviously not, you can never have two files with the same name in the same directory!
amaneet wrote: What is the meaning of x in aspx file.
erm.... is this a serious question?
|
|
|
|
|
Sir,
Can u please explain in deep , y there is any need to make more then one web.config file.
and I did not get the answer of my another problem.What's the meaning if x in aspx file.
Thanks
|
|
|
|
|
|
amaneet wrote: y there is any need to make more then one web.config file.
as u can organise ur pages into folders and have web.config per each folder to control pages per folder
simple example :
u can have ur home page and other non secured pages having web.config file that enable any user to access them [there are no authentication included in web.config file]
and put other secure pages in a folder having web.config file that specify that authenticated and authorized users only can access [authentication is included in this web.config file]
i hope u get it
amaneet wrote: What's the meaning if x in aspx file
i donot remember
|
|
|
|
|
kitokatakito wrote: as u can organise ur pages into folders
plz dnt use smsspk n da 4m, tis nt lmted lik fone.
|
|
|
|