Web Forms :: Any String Inside Web Part In Web Application Not Showing
Jun 11, 2010
Why is it that a simple string inside a webpart not showing when the application is run ? Actually my requirement is to use a fusion (usually called as a function) and Visifire chart (usually called as a function from javascript) in web part which i'm not able to consume at all.
I have a listview that is showing its result by using a linq query. The linq query goes like this.
[Code]....
* db.Varer: Varer is a table that contains basic product information like proudct name, product nr. etc. ** a.fk_kategori_id == CatParamId : I'm just saying limit the result according to the Category ID (a.fk_kategori_id). The category id is coming from a dropdownlist (CatParamID) *** Join: Besides the Varer (Product) table I also have another table, Sizes. This Sizes table contains 6 columns (ID_Sizes (int) primary key and the columns: OneSize, S, M, L, XL, XXL all are bit (true or false)). There is a relationship between Varer table and Sizes table. It says that I can only insert a value into the "fk_sizes_id - column" of varer table if that value already exists as primary key within the Sizes table. **** I'm starting by picking basic product values like productId, ProductName etc from the Varer (a) table ***** Then I'm picking the corresponding Sizes values (onesize, s, m, ...) from the Sizes table. Now within my ListView I'm showing the above result by using Eval, like this.
[Code]....
And this works perfectly, but now comes the thing that is causing me trouble. I have the below drop down list (still within the ListView ItemTemplate):
[Code]....
I want this drop down list to be populated with only those of the "linq query's Sizes table result" that are true. By "Sizes table result" I mean these
Why can I still access files inside a forms authenticated part of my site? Any webpages say that you need to login to view them, but people can still access images by typing in the address bar. I am using forms authentication with my own database, so none of the aspnetdb services like membership roles etc. Is this a bad way to do things because I'm pretty deep into it now and it would be very difficult to change.
i am using datasets as part of my web application architecture.
i have one dataset which has two tables which are populated from database . everything works fine but when i have change in stored procedure. i change structure of datatable in dataset file after that compilation errors start to throw up. when i check cs file of dataset it shows multiple classes with different names.
cant get into it. since im using datasets for first time. its getting frustating.
i have a website that use globalization to several languages (VB Framework 4.0)
i need to get all languages exist in App_GlobalResourses directory because i don't know in future the website owner will add or remove some languages
for that i try to access in App_GlobalResources folder and i list the existing files in there now i have an array of fileInfo but i don't know how can i get some part of the file name
it return "General.resx", "General.en-US.resx", "General.fa.resx" and so one...
(I believe that this applies to both normal ASP.NET web parts and SharePoint hosted web parts)
The web part has an 'export' button that renders the output as csv and sets the appropriate headers so its opened in Excel.
Hooking in the buttons click event, clearing the response, adding the appropriate headers and content types is trivial - example
However I've noticed that if this code added to a web part and a debugger attached then if there are multiple instances of this (or any other) web part on the page then neither HTTPApplication.CompleteRequest or Response.End stop the processing/page lifecycle and all the events for all the page controls still fire.
This is wasteful in this example as the other web parts don't need to run - nothing they do will get to the response.
How to show video (.wmv file) inside aspx page. Currently am doing with the help of javascript.When i click on link the video will open in separate window. instead of that I want that video to
I am trying to retrive the query string value and display it on the aspx page. The query string is passed from a gridview. Everything works fine except i noticed that when there is an '&' in the query string then the label on the page will display only uptil the '&' (i.e. excluding the '&'). Just so to let you know. I retrive the value of the querystring into a string variable and then assign it to the variable. I have noticed this only for '&' character but maybe there are more characters with sinmilar bahaviour that I am not aware of.if anyone has a workaround on displaying all the content from the querystring then do share.
I have four columns in database. Consider it as a,b,c and d. I'm trying to place a and b column values in TO part and c and d column values in CC part in outlook. a,b,c,d contains six digits numeric values. I just need to place a and b columns values in to and c and d values in cc part on click of a button.
I have a .txt file named: myTextFile.txt on my hostingaccount that contains this string: "Hello"
Now my hostingprovider says this: "Any file that you can access via your domain can be accessed through a Secure Socket Layer (SSL) connection as well."
When I type this manually in the address field, my browser will show the string: "Hello" in the top left corner: [URL]
My question now is if it is possible programatically to write this address down in the browser and retreive this string using this Secure Socket Layer (SSL). (https://) ?
The thing is that I will implement this in a C# winform application so I will try to ask this question here as the logic hopefully could be the same.
I have created a user control as part of an asp.net web application. This control works fine. I have then moved the control into a class library and attempted to reference it in my original application. I find that the asp controls created in the ascx for the control (texboxes and buttons) are no longer instantiated i.e. I get a null reference exception in my Page_Load event handler when I try to reference them. The only change to the page in my original application has been to change the register statement to load the control libary dll otherwise this is identical to when the conmtrol was part of the application:
I am writing an MVC application, and I wanted to do some extra formatting so the phone numbers all are stored the same. To accomplish this I made a simple external function to strip all non-numeric characters and return the formatted string:
I have created a gridview and added a headertemplate field inside templatefield. Inside header template field I have added a button and a condirmbutton extender. confirmbutton extender uses modelpopup with ok cancel. This works fine but with one problem. I want this popup to open on button click only if user has checked atleast one checkbox from gridview. So far it shows this modelpopup everytime even user hasn't checked anything.
I have written a sample web service, which consist of certain .aspx pages. I have written a code to consume webmethods from that web service. Now, is it possible to load the aspx page which is a part of the web service from the calling web application i.e. from another aspx page which is outside the web service.
How this scenario is;
I have one web application running with a page say Page1.aspx in browser. 2. I have created a web service which is having an aspx page say Page2.aspx. 3. There is a button on Page1.aspx. 4. Now, when client click on the button, is it possible to load Page2.aspx, which is not a part of web application, but the web service.
[code]...
What I am trying to do is, get response obtained in Gen.aspx and pass it to default.aspx page.
I need to use images in my ASP.NET MVC application that are not included in the application, but are saved in the file system of the server under the c/documents folder.
How can I get these images?
I have a AppHelper class that looks like this and will use to get the path
[Code]....
then in my view i will use this the get that image
In my application when I click on one of my button in the page it is giving error like this..
Could not find a part of the path 'V:UserEnterTrailorVideosluck.swf'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details:
System.IO.DirectoryNotFoundException: Could not find a part of the path 'V:UserEnterTrailorVideosluck.swf'.
There is No folder ("EnterTrailorVideos") in my project. But it is showing like this .
I wasnt sure where this question best belongs, in the end I figured this was the best place...
Say I have a utility dll that i might use in either a windows console application or in an asp.net web application - how can I programatically find whether it is running on web or windows, from within the dll?
I feel like this is something I should know by now, maybe some property of AppDomain.CurrentDomain, or Environment, but I just can't find it.
The reason I'm asking is because I'm playing around with nHibernate for asp and I seem to need different session handling when running in asp.net, compared to when i'm running integration tests. So if someone knows how i can solve this without programatically checking the context of the application, then that'd be great too.
I currently have a client with a SharePoint site that wants to incorporate an (already written) ASP.NET application within a webpart in the SharePoint site. The ASP.net application currently uses an IIS impersonation account to connect to the SQL database.
Some added functionality the client is requesting would require me to grab the user's windows login identity to use the SharePoint UserProfileWebService to query the PropertyPages for that specific user. Because the (already written) ASP.NET application uses impersonation, when I grab the WindowsIdentity.GetCurrent().Name, I get the impersonation account and not the actual user's account.
Is there a way to keep the current setup (impersonation account on IIS to connect to SQL) and still grab the logged in user's credentials? Or would a better way about this be to change IIS to consume the Windows Identity of the logged in user and encrypt the connection string in the web.config?