|
You cannot do that using DropDownList control. It doesn't supports whatever you asked. Try to use a custom dropdown (JavaScript DropDown).
|
|
|
|
|
My application is written in ASP VB.Net VS-2002. I need to basically call another VB executable. When using either the shell or Process.Start method, I consitently loose my ASP Session variables upon returning to the orginal .aspx. Any suggestions would be great. --Tomb
|
|
|
|
|
You can use session state [^]with Mode = SQL Server. that will save sessions in DB
|
|
|
|
|
This did solve my direct problem. Thank you. I'm concerned about web articles I'm reading about problems with Hang-Ups and performance in a full Production MultiUser environment when using SQLServer sessionState database ASPState. Anyone have any warnings, tips or suggestions.
|
|
|
|
|
Why are you using Process.Start in a web page ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
This a long story. In short, I'm using Process.Start on the Web application because I need to call executables and leverage pre-existing developed components. NOTE: Any call or shell from this area of the Asp .vb module was loosing my Session variables. Even shells to MarshalAs.exe. Articles researched on the Web and MSDN led me to Process.Start as the best method in a ASP VB.Net application.
|
|
|
|
|
Greetings, I created in Visual Studio 2005 in ASP.NET page in C#. This page has a vbscript that it's invoke with System.Diagnostics.Process.Start("C:\\TEMP\\myfiles.vbs"). When I tested my page with Visual Studio the page runs perfectly. As soon I setup the page in my local IIS the script doesn't run. I believed the problems with credential but I don't have any idea how to fix. I added in the security of the folder TEMP the account of localmachine\ASPNET with Full Control and the script doesn't run. When I check the TASK Manager I see the process wscript runs but it doesn't execute.I don't understand. My IIS is version 6.0, my local machine is Windows XP. In my web.config has the following information:
<system.web>
<compilation debug="true">
<assemblies>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A">
<authentication mode="Windows">
<identity impersonate="true">
I don't have any idea about it. I appreciate the support about it.
|
|
|
|
|
Fabu1971 wrote: I appreciate the support about it.
My advice would be "Don't do it". I can't imagine any good reason to spawn a VB script from a ASP.NET page.
led mike
|
|
|
|
|
Good advice. You got my 5 to counter the OPs 1. I would ask him why he's doing this at all, but I expect all I'd get is a 1 vote for trying to help.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Christian Graus wrote: but I expect all I'd get is a 1 vote for trying to help.
NAH! That would never happen!
led mike
|
|
|
|
|
What if its running but vbscript code generated an error? Did you add loging to the code?
|
|
|
|
|
The script was stored. When the code in ASP.NET call the script doesn't do anything. The code when run in VS run very well. When I pass the code to IIS service (Version 6) the page run in the IIS, the script is invoked but it didn't run. I don't what is the problem.
|
|
|
|
|
Hey, i'm playing around with a calendar control, and i have it hidding with some CSS so that it only shows up when you hover over it(once visible) or a small calendar icon. i'm not using ajax, although it may be the solution. but since the control does a post back every time you change the month you have to go mouse over the icon again to see the new month. i'd like to either make the calendar stay visible after postback or show 3 months in the one control...i could use 3 controls but there has to be a better way. espically since i need the user to choose 2 seperate dates, so i'd need 6 controls. Any ideas would be appreciated. I'd be happy to post the CSS and HTML that does the hover and popover effect if someone is interested, i like it.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
|
no, but thats really cool. i recently upgraded to vs 2k8 and .net 3.5 and work has kept me too busy with other things to get to play with any cool new ajax things. any pointers on what i need to include or add references to in my project to get that control to work?
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
I figured it out...Thanks for the info. for anyone else trying this, just add the controls to your toolbox via their online instructions, then you just need an asp:scriptmanager with a after it containing all of the ajax controls.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
hi frnds,
i am stuck by problem of calling aspx by another aspx and these two aspx pages are in different asp.net web applications.
If i include two asp.net web application projects in solution explorer, is it possible to call aspx page of one application from aspx page of another application.
And if it is not possible the alternative which occur in my mind is that making different project for each application and deploy each project seperatly in IIS then calling aspx to aspx but still dont know is it possible.
Plz anyone suggest me the fine solution to this problem.
Thanks a lot !
Thanks & Regards
Manish Singhal
Software Engineer
Maxworth systems(Delhi)
|
|
|
|
|
assuming you dont want to pass any kind of session info between the pages...you can use Response.Redirect(address);
since they are different projects i assume they will run under different domains, so session info wont transfer..and since they're different pages viewstate wont either. if you have to pass information between them, the only way i can think of is to either put the information into the query string and go to a "hide" page which puts it back in the session and redirects to the page you want(small security hole there..well not really small) or the better way is to put the info into a temp table in the database with a random pointless temp id that is generated each time, an dpassed to the new page in a query string, which th enew page uses to lookup the info and then delete it from the database, once its been read into memory..thereby preventing anyone from breaking in because the table will have random id's and will never have much data in it...once you're able to see the ID its already been deleted. if you want to hide the query string, you can either use a frameset when you first go to the page, or use a "hide" site to quickly move it to the session then go to the new page.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
hi
Thanks for ur concern but right now i dont want to pass anything in between ....................u said response.redirect(address)
but the question is if the applications installed on the server which has the ip say for example :- 123.12.3.23 and application folder name dialgmr in wwwroot of IIS then it will be
Response.Redirect("123.12.3.23/dialgmr/default.aspx);
Is that ur mean and this will not run on asp.net server localhost
Plz Give some example if possible
Thanks a lot !
Thanks & Regards
Manish Singhal
Software Engineer
Maxworth systems(Delhi)
|
|
|
|
|
ok say i have 2 web apps... a main app and a app that lets me process credit card info..you get to the main app by going to www.jimbob.com(i dontknow if thats a real address or not), and the payment app is in a subdomain payment.jimbob.com so that i can use it from other apps when i build them. make sense so far? good, now i have a button somewhere in the mainapp that takes you to the payment piece to buy something, so in the button click i'd insert data to the db(i do need to pass things between sites) and do a Response.Redirect("http://payment.jimbob.com/payment.aspx?tempId=35hgs"); now that obvisouly wont work in my dev environment because the dns records for jimbob and payment.jimbob poitn to my production webserver. so i put an entry into the <appsettings> section of my web.config file for the main app project that looks like, <add key="paymentPath" value="http://payment.jimbob.com/payment.aspx"> so with one change i make the apps work in dev or prod(i also have one for the connection string to th db so i can switch between dev and productio ndatabases easily. with the web.config entry my button code changes to
Response.redirect(ConfigurationSettings.AppSettings["paymentPath"] + "?tempId=35hgs");
i have used this method but have not tried the code snippets here, i may and probably do have typo's,sorry. if you're in dev and your dev machine is hosting everything, you can use http://localhost/whatever but you do have to have the http part if your leaving th ecurrent project/domain(changed from www.blah to payment.blah counts as changed domains espically if you are using ssl to secure things(i recommend that) and session info wont transfer..it also wont transfer between secure and non secure as the session is encrypted comeing out of secure, and its expceted to be encryped going into it..i may be wrong with the newwer versions out now, but i remmebber having that problem a couple years ago. If however you want to simply change directories or pages in the same projet you can use relative paths ../newdir/newpage.aspx or if everything is in the same dir you can use "newpage.aspx"
hope this is more helpful. if you want the exact code or more code than i've given you i recomend asking someone else, or reading the msdn pages about Response.Redirect or some of the articles here i know deal with it. for something more complicated i may post full or more code, but i hate posting full code for people because the vast majority just copy it and never learn how it works and its mine/our fault when it breaks.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
thanks. now i dont need to have two diff projects so this issue will never arise . thanks a lot
Thanks & Regards
Manish Singhal
Software Engineer
Maxworth systems(Delhi)
|
|
|
|
|
I have a trivial webservice set up that takes a single parameter and returns a number of items according to the value of the parameter:
[WebMethod( Description="Returns the top 'count' latest articles.")]
public XmlDataDocument GetLatestArticles( int count )
{
if (count < 1)
count = 1;
if (count > 100)
count = 100;
return ArticleCache.GetLatest( count );
} I have some simple parameter checking, such that the method will always return at least one article and at most, 100 articles.
However, if the client does not provide the count parameter at all, a System.ArgumentException is thrown before the webmethod is called and an ugly error is returned to the client. I would like to be able to catch this exception and supply a 'default' value to the inner method call, so that the client continues to function.
I tried making the count parameter nullable, but then the default WsdlHelpGenerator.aspx doesn't display it, because "The test form is only available for methods with primitive types as parameters." This makes it rather difficult to test - especially as the services are for consumption by a third party developer.
Is there any (elegant and easy) way of catching the exception and handling it gracefully?
Thanks.
|
|
|
|
|
depending on how you have things set up..i wrote an xml file and from there had a wsdl and server stubs generated, but in the XML i'm pretty sure that you can make the parameter optional, then look for it in the server and give it a default value if it s not there. or you might be able to set a default value in the XML...since you typically need a wsdl and the xml file(maybe) to generate a client app, it should work for everyone. i believe setting the minoccurs attribute to 0 in the xml file makes it optional, but i have not tried it.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hi there,
I've craeted a new WebControl in my controls subfolder of my project named myWebControl. VS2005 now created a public partial class controls_myWebControl which derives from System.Web.UI.UserControl. My myWebControl has some Properties, The trouble I have is to load this control in Webpages (project folder) calling
<code>controls_myWebControl myCtrl = (controls_myWebControl)Page.LoadControl(path to myWebControl);</code>
I can only create an instance of WebControl but now I can't use my properties. Any advice? Thanx in advance!!!
|
|
|
|
|
Hi,
Just check whether you have set accessors also defined for the properties in your user control.
And also just check whether the access modifier of the field is private and the property is public.
As i see there is no problem the way you have done it..
Hope it helps
Thx,
Gayani
|
|
|
|