|
You can create a class in App_Code and declare your variables as static. Hence if your class is called Database and u declared static con as sqlconnection, you can access this variable by doing: Database.conn
Live in fragments no longer. Only connect.
|
|
|
|
|
Mohammed,
Try reading through the link titled How do I store global variables?
http://steveorr.net/faq/GlobalVariables.aspx
Some basic steps:
1. declare a variable as you would any variable in asp.net with the Dim command
2. somewhere in code, retrieve variable as a session variable
For example,
Dim testGlobalVariable As Integer
testGlobalVariable = 100
Session("thisIsAGlobalVariable") = testGlobalVariable
...
in another page...
Dim ReadGlobalVariable as Integer
ReadGlobalVariable = Session("thisIsAGlobalVariable")
Hope this helps.
|
|
|
|
|
See my reply in your previous thread.
---
b { font-weight: normal; }
|
|
|
|
|
you can use module form to declare global variables
example:
public con as new sqlclient.sqlconnection
public dataset as new dataset
The above commands can be accessed by all forms by declaring them and placed in the public class in seperate module form ok
coding makes me interesting in dot net
|
|
|
|
|
Hello,
I'm making a project in asp.net with vb,i have a page named as IndividualProperty.aspx.
I'm showing the listing of all the property one after it in the page.when any user select any property such as he select "abc" property, when he click on this Property the IndividualPropertypage will be called.that is ok.
but i want to change the URL from www.xyz.com/IndividualPropertypage.aspx to www.xyz.com/abc.com
meanwhile whatever the property he select property name must be replace the page name in the URL.
How is it possible,plz tell me thanx
|
|
|
|
|
Hi,
I have an app that needs to do some sort of health checks on all database connection strings specified in the config file.
At the moment, I have a main aspx page that loops through all these db connection strings, and for each one of them, I dynamically add an iFrame which loads a secondary aspx page that does the checking of the connection. (I'm adding the iFrame into a placeholder control by the way).
My problem is, it looks like that the main page waits for all the iFrame to finish loading before they get rendered. What I want to achieve is, as soon as each connection string is tested, I want it to display the result at once on the main page.
Any ideas on how I can achieve this? Your help is much appreciated.
Thanks.
Cheers,
TheFan
|
|
|
|
|
so you want the main page to be rendered and sent to the browser before the pages in the frames are loaded?
I'm not sure that would work with the iframes and even if it did you might need to refresh them periodically to simulate an ongoing test cycle.
Another neat way to do this might be:
1. Just create the one 'main page'.
2. Add a javascript function to the header to set an interval.
3. When the interval function calls back, call a set of javascript functions that use XmlHttpRequest to request your secondary pages (the ones in your frames right now, that execute your database tests). Set the call back in the http request call. Set a page level variable to say that a page request for page xxxx is pending (so you don't start calling it more than once if the interval were to elapse), and check this value before making the http request.
4. When your xml http request callback is called, just do a document.write or something to say your test worked. Or keep the iframes in the mainpage (but don't set their source) and when the http request callback is fired, set their innerHtml to what you get back from the request.
-- modified at 16:31 Friday 4th August, 2006
|
|
|
|
|
I have 2 questions
1. I have 3 select buttons in gridview control with property SelectText(AddUser,Delete,View)
how i get which select button is clicked in SelectedIndexChanged event
2. When i set Visible property of a bound column = false, i m not able to get its value at runtime
like below.
GridViewRow row = dgNGroup.SelectedRow;
string a = row.Cells[3].Text;
Any idea please
Know Yourself Then Grow Yourself.
|
|
|
|
|
Hi
row.Cells[3].Text will gives blank. Bounded Column will retuns DataBoundLiteralControl. with this u will get the cell value
DataBoundLiteralControl dbLiteral= (DataBoundLiteralControl)row.Cells[3].Controls[0];<br />
string a = dbLiteral.Text;<br />
regards
GV Ramana
|
|
|
|
|
Hi
A bundle of thanks. What about my first question.
Thanks in advance
Know Yourself Then Grow Yourself.
|
|
|
|
|
i wnt to use summary validator
and other validators visibility off
-- modified at 9:01 Friday 4th August, 2006
-- modified at 10:17 Friday 4th August, 2006
omi
|
|
|
|
|
so what ? you didn't specify what do you want to do with ? just validators ?
the summary just let you to see all the error messages together in a summary that is all
just if you can make the question more clear i think i can help
try to be good if you can't be the best
|
|
|
|
|
Dear Friends,
How we can use INPUTBOX in ASP.NET 2.0?, Pls HELP ME Dear Friends
Haridas.R
harisofttech@gmail.com
harisofttech@hotmail.com (online)
harizeenet@yahoo.co.in(online)
"Achievement is not a destination, its a journey "
|
|
|
|
|
What is this mysterious INPUTBOX of which you speak?
|
|
|
|
|
I believe INPUTBOX is visual basic 6.0 utility to display a pop-up with programmer-defined text which usually contained a question/prompt for text information. The recipient of this pop-up would be enter in a text in a field in the pop-up and click OK on the pop-up.
The code I have been using for just a plain pop-up in asp.net - no field for data entry (just in case this is a start for getting to one that has a field for input) is
Public Sub ASPNET_MsgBox(ByVal Message As String)
System.Web.HttpContext.Current.Response.Write("" & vbCrLf)
System.Web.HttpContext.Current.Response.Write("alert(""" & Message & """)" & vbCrLf)
System.Web.HttpContext.Current.Response.Write("")
End Sub
In my asp code, I would call this subroutine to display a pop-up message like
ASPNET_MsgBox("Hello World")
or
Dim sampleMessage As string
sampleMessage = "basic stuff"
ASP_NET_MsgBox(sampleMessage)
The one catch on this asp.net pop-up subroutine is do not pass it a string containing double quotes. No pop-up will appear, no error message or nothing will happen....
|
|
|
|
|
|
Maybe you should write what exactly you want to do.
You can use System.Web.UI.HtmlControls.HtmlInput* controls, if this is what you have been asking about...
Pilo
|
|
|
|
|
hey
i m developing web appln using C#.. all of a sudden.. my IDE shows an error after i click debug i get a Message "Unable to start debuggin on the server.server does not support debugging of asp.net and ATL Server applications. run setup to install VS.net server components"
can sum one tell me wats this bout
Kunal Piyush
|
|
|
|
|
Not sure but one thing you can try is to go to the command line and execute
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things
--thedailywtf 3/21/06
|
|
|
|
|
thanks a lot.. it worked.. though my .net framework was v1.03..but installing asp.net was all that was needed
again thanks.
Kunal Piyush
|
|
|
|
|
hi,
iam not soliciting bids for someone to write this for you
but iam new comer to the software field.iam not able to get the the link for the stock ticker.
so iam kindly request you to do help for me.
thanking you
regards jeevan.
|
|
|
|
|
First, use a more descriptive title. Refer to the very first message on this board from Chris.
Second, explain your problem clearly. What stock ticker?
only two letters away from being an asset
|
|
|
|
|
Hello all
in my asp.net 1.1 page.
If user closes the browser close button we are redirecting to the logout page and closing the browser.
for this onbeforeunload event i am calling java script which will navigates to the logout page & closes. This is working fine for IE.
same thing is not happening in Mozilla firefox browser 1.0
how to solve this problem?
regards
GV Ramana
|
|
|
|
|
Hi,
We are trying to convert word and excel to html format, we are using late binding to support different version of office. We have already taken care of setting dcom security to interactive user and also we have given [B]'launch and active'[/B] and [B]'Access permissions'[/B] for aspnet(Network service in case of 2003) user.
The problem is it works absolutely fine in some systems, but it will not work in some systems and throws error as Unauthorizedaccess for CreateObject call.
The only difference i could see in working and non working system is, in working system dcom services of excel and word are running with name like "Microsoft Excel Application", but in nonworking system these servies are runnig with GUID like "00020812-0000-0000-C000-000000000046", and this is just a difference i saw I am really not sure whether problem is because of this only or not.
PS: We are no supposed to impersonate aspnet user, so in our web confgi we set impersoantion to false.
|
|
|
|
|
Your aspnet user does not have correct permissions to run that file ( the actual executable for word )
--------------------------------------------------------
1 line of code equals many bugs. So don't write any!!
My mad coder blog
|
|
|
|