|
I want to get values from dropdown list. For Example it has value 5 now. I select 1 from dropdown list. I want to store 5 in one variable and 1 in another variable. How can I store old value of dropdown list. I can store new value.
I have followng event handler:
public sub change(sender as object, e as EventArgs)
pos_new.DataTextField = CType(sender, DropDownList).Text
end sub
pos_new as a globle variable of type dropdown list.It store new selected value. But How can I store the old value. I m using that dropdown list on a datagrid. I have taken pos_old global variable for old value. I m using VB.NET as code behind language for my ASP.NET pages
|
|
|
|
|
hi there....
This is the code defaultly i'm having in sample.aspx file..[ html view ],
<%@ Page language="c#" Codebehind="sample.aspx.cs" AutoEventWireup="false" Inherits="Demo.sample" %>
I converted this sample.aspx.cs file into sample.dll file successfully. Now how should i write(include) the page directory in sample.aspx file, and what are the steps to upload this sample.dll file in remote server..
Please Help me...
regards n Thks
Sam.M
|
|
|
|
|
how can i get all the aspx files from my project?
thank you
|
|
|
|
|
I don't understand your request. Can you be more specific about what is it that you are trying to do.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
i need to get the names of all webforms used in my project.
for eg. default.aspx,home.aspx,search.aspx.. etc
|
|
|
|
|
Read the file names in explorer?
Be more specific. Are you trying to programaticly list all files in your project or what?
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
yes in programaticly.. i need to display all the file name used in my project ie. all .apx files from solution explorer
i need to show all in a listbox or label..
|
|
|
|
|
Use the System.IO namespace. DirectoryInfo for instance. Google for some tutorials if you don't know how to use it...
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Hi,In web app i have to generate a table dynamically,and the cell values are store in the database.
I want to use javascript instead of codebehind to generate tablerows.
Then when i click the button all the tablecell values are store in the database.
How can i send values to server to store them in datbase?
Or which is the best one?Generate table through javascript or codebehind?
Advanced Thanks,
Srilakshmi
|
|
|
|
|
Hi there.....
How to include codebehind converted dll file in the page directives.Please help me
Regards n Thx
Sam.M
|
|
|
|
|
hi
i dont know exactly what you are asking but one solution is there if you dont know. you have to add reference of that dll in your solution file. for that right click on solution and click on add reference... and then click on browse and select your dll then that dll will be available to you
Regards,
DJ Rock
|
|
|
|
|
Thanks...........
Plz help me.....
This is the code defaultly i'm having in sample.aspx file..[ html view ],
<%@ Page language="c#" Codebehind="sample.aspx.cs" AutoEventWireup="false" Inherits="Demo.sample" %>
I converted this sample.aspx.cs file into sample.dll file successfully. Now how should i write(include) the page
directory in sample.aspx file, and what are the steps to upload this sample.dll file in remote server..
Please Help me...
Sam.M
|
|
|
|
|
Hi all,
I have a javascript function which will capture the screen coordinates of a browser window on a left mouse click.
I have one image on a browser.When i click on the image,i would like to open some textbox control instead of capturing of screen coordinates(which happens by means of javascript function i have).
I couldn't able to mask that javascript function which captures screen coordinates.
What i want is that specific javascript function should be off when i click on the image on a browser.When i mouse click on a browser other than a image,javscript function should work well and capture screen coordinates properly.
HOw can i acheive this?
Plz help me out of this problem.
|
|
|
|
|
I'm guessing you have a document.onclick = myCursorFunction....if that's the case, then just set the onclick of the image to point at a different one...
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Hi
I need a control in which i can selct a value from drop down list & also can type an item in that. i.e. like an combo in Visual Basic. Please let me know, which control provides both of these functioality....
If there no control exist, can you please give me a direction how to create a user control for this task. How to customize a dropdownlist to provide the required functionality.
Thanks
Manish
|
|
|
|
|
I have a webpart that displays departmental news. Every department have different news section for instance Admin dept have three news section:
1- Admin
2- HR
3- General
Sales dept have four:
1- Company Sales News
2- Stock News
3- Global Market News
4- Sales Forecast
Now, I want to expose these sections as properties of my WebPart so if a Sales user is logged in; when he will enter Edit Mode; he sees all four sections in Sales Dept and from which he can choose what all it is that he wants to see on the webpart.
I can hardcode something like this:
protected bool _CompanySales = true;
[ Personalizable(PersonalizationScope.User),
WebBrowsable,
WebDisplayName("Company's Sales News"),
WebDescription("Use this property to show/hide Company's Sales news")]
public bool CompanySales {
get { return _CompanySales ; }
set { _CompanySales = value; }
}
protected bool _StockNews= true;
[ Personalizable(PersonalizationScope.User),
WebBrowsable,
WebDisplayName("Stock News"),
WebDescription("Use this property to show/hide Stock News")]
public bool StockNews{
get { return _StockNews; }
set { _StockNews= value; }
}
protected bool _GlobalMarketNews= true;
[ Personalizable(PersonalizationScope.User),
WebBrowsable,
WebDisplayName("Global Market News"),
WebDescription("Use this property to show/hide Global Market News")]
public bool GlobalMarketNews{
get { return _GlobalMarketNews; }
set { _GlobalMarketNews= value; }
}
But I wouldn't have any knowldge of these sections because they are stored in the database. So I guess my question is; how can I dynamically define properties of a webpart by pulling the data from a datasource?
Thanks in advance.
|
|
|
|
|
I'm creating an ebay type website for a class, and the user can open a pop-up window to select a picture from the folder on the server for their product.
The issue right now is that all images for all users are uploaded to the same folder. I need some control in C# or ASP.NET that will create a new folder when a new user is created that only they can access so that only their pictures will show up.
Some other information that may be relevant is that I am NOT using ASP.NET membership controls; I'm using Forms Validation.
I've searched online for the solution until I'm blue in the face, and I've had no luck. Is there anyone that has advice for me about this?
Stephanie
|
|
|
|
|
Sthepanie i faced the same problem and at the end i had to make my own solution, and i will write it for you, i hope you can understand the next lines, im not good to explain.
Onto dataBase you must to create three tables, they are users, images, and the relation images_owner.
for Example:
Users images_owner images
coduser (pk) codrelation codimage (pk)
nomuser coduser urlimage
codimage
You already have a folder to save all the images, right here you must to create a particular folder for every user, in another words you created the user, created the folder. (use the coduser like folder's name)
the sentence to create the folder is:
DirectoryInfo di = Directory.CreateDirectory(url);
Invoice the System.IO library to create server folders.
Right now you must to have this folder
allImages/coduser
You can update your images for any particular user, when the user login in the site, write a session var with the coduser code, and every time that you upload a picture (fileupload control)
fill the relation table image owner and save the image onto particular user folder with the codimage like name.
To show the image select all the codimage from image owner where the coduser is the session user code.
keep Learning and you never will be out of date...
|
|
|
|
|
ive just took the plunge with vs2005 from vs2003 and there are a couple of things that are truly boggling me!
1. i like to have a page called 'basepage' in which i add lots of useful functions. every page i add to my project inherits from basepage so it has easy access to all my pre-built functions.
i have created my basepage but it does not appear in the intellisense list after the 'inherits' statement when i type and it does not appear to be known as a class. why is this???? its driving me nuts!!!
2. i like to setup namespace imports for heavily used namespaces such as system.data.sqlclient and system.text. i cannot find the utility to do this where it used to be nor does the help give me any clues.
please help a very flummoxed vs2005 noob!
---Guy H ( ---
|
|
|
|
|
Hi there,
1. Where do you define the basepage class? In the App_Code folder or a seperate project? Do you try to compile the project before using it?
2. You can define the namespaces in the namespaces Element for pages[^]
|
|
|
|
|
hi thanks for your reply.
the basepage inheritance seems to work now which baffles me even more.
thanks for the namespace tip, ive got it sussed now
cheers!
---Guy H ( ---
|
|
|
|
|
hi dears,
I upload my database to my sql server 2000 host( a server on the internet) and have a website project in VS2005 with a connectionString like this "Persist Security Info=False;User ID=myUser; Password=myPass;Initial Catalog=myDataBaseName;Data Source=sql.myserver.org" . when I run my website on my pc I can connect(!!!) to database and show data in app, but when I upload my website to my hosting area I can`t connect!!! what should I do to fix this problem ?
Regards,
|
|
|
|
|
Hello friends I have read all the articles regarding sending emails through an application...all of these includes the use of an SMTP server...Can anyone tell me how to use the Hotmail or GMAIL server or any other SMTP server available online(and not IIS SMTP server). These requires the use of secure login...err..How to do it ? Plz help.
Victor Sinha
|
|
|
|
|
AFAIK you can't. Hotmail (at least used to) uses HTTPMail, and most of the other web based providers prevent relaying to stop spammers. Best bet is to use your company's mail servers, or if you just want to send, you can download several free SMTP servers from t'internet.
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Hello,
I am need to get a connection string details. I am doing as follows:
01: Dim connectionStrings As New ConnectionStringSettingsCollection
02: Dim connectionString As New ConnectionStringSettings
03: connectionString = connectionStrings.Item("MyConn")
04: Console.WriteLine(" Connection String: ",
connectionString.ConnectionString) *** ERROR ***
05: Console.WriteLine(" Name: ", connectionString.Name)
06: Console.WriteLine(" Provider Name: ",
connectionString.ProviderName)
I get my first error on line 04
System.NullReferenceException: Object reference not set to an
instance of an object.
To check my connection string I did the following:
Dim otherConnectionString As String =
ConfigurationManager.ConnectionStrings("MyConn").ConnectionString
Response.Write(otherConnectionString)
And I get:
Provider = Microsoft.Jet.OLEDB.4.0; Data Source = C:\Documents and
Settings\User\My Documents\Visual Studio
2005\WebSites\MySite\App_Data\MySite.mdb; User Id=; Password=;
Which proves I have the connection string with name MyConn in my
web.config.
Could someone tell me what am I doing wrong?
I tried everything I could think off.
Thanks,
Miguel
|
|
|
|