|
I have observed that for dropdown, we have to use either DataValueField or DataTextField or both. Without these, values are not visible in dropdown.
Still confusing wWhat's the purpose of DataValueField and DataTextField?
Why to use and which to use when?
As per my undertstanding:
DataValueField: for Backend
DataTextField: for front end
But in general scenarios, whatever we display in dropdown using DataTextField, we will update/delete etc the same at backend using smae colum in DataValueField.
SO any good example to show their diff as well as utility?
|
|
|
|
|
amittinku wrote: DataValueField: for Backend
DataTextField: for front end
Correct.
amittinku wrote: But in general scenarios, whatever we display in dropdown using DataTextField, we will update/delete etc the same at backend using smae colum in DataValueField.
Sometimes. It's often possible that you would, for example, show a list of employee names. Odds are, you'd prefer to look them up in the database using an employee id. That's what the value field is for.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi,
Is it too bad if I create my own user management instead of using the AccountController and the filters [Authorize], etc?
If not, do I just remove the views and controller associated?
If it is bad (maybe because it is very flexible), is it possible to map from a database the users easily? I'm using Linq to sql
Thx
|
|
|
|
|
I don't think it's ever bad to write your own code, I think it's a plus. Unless the built in stuff is EXACTLY what you need, why use it ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
hi,
i use ASPNetFlashVideo ,i have many clips i want playing these clips one by one on same ASPNetFlashVideo player.
thanks
|
|
|
|
|
This has nothing to do with ASP.NET. Flash videos are played in a flash component. Your flash component needs to support playlists to do what you want to do. The one I use, does.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
hello,
This is Vikash Gohil.
I have a query related to DLL files usage in ASP.net website.
I have a windows application where I use DLL files provided by the manufacturer to Communicate with Smart Card Devices using TCP/IP(LAN).
I use functions in DLL for various operations on Smart Card Devices.
Now I want to convert my windows Application to Web Application.
So I want to know will the DLL files are to be used the same way as I do in Windows App.
I have tried doing this. I put all my DLL files in Bin folder of my site.
Now When I open the browser and execute the code, it works fine from My PC.
But when I open it in another PC, it does not work.
So I want to know is it that the DLL files are already registeres on my PC so it works from here, but on other PC they are not registered so it doesn't.
Do I need to Install/regsiter DLL files on other PC also. If Yes How to do that.
How Can I check for DLL files and Prompt the User to download the installation for registering DLL files.
Just like any active-X control is missing, the browser Shows message on top.
Please help, I am in extreme need on any help. Actually I am new in working on Web Development.
Thanks in Advance.
|
|
|
|
|
So you are going to read Smart Card of Client System using ASP.NET Application ? Its not possible in normal way.
Its working in your system becuase the application runs locally, when you will host and access from client system it will read only server information rather than Client Info.
You can use ActiveX control to resolve this issue. But it will work only on IE.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Hello, Abhijeet.
Thanks for the reply.
Actually the Smart Card Device is not COnnected to any Client PC.
The Web App will work in Intranet environment and The Device will be Connected in LAN.
And I would Communicate using Device IP Address.
So Whether I run from My PC or another PC it is the same, I think.
|
|
|
|
|
Hey, First of all, I should clear you that Web and Windows are something different.
In case of windows, the dlls are read using Reflection or COM based approaches.
In case of Web, browser only identifies what mentioned in w3 standards. These are basically XML, Javascript, CSS etc.
If you want your web application to read your custom dll interface, you need to create your own custom activeX/browser plugin which the user is forced to install in the client computer and then use the interface...
Basically if you are forcing the client to install browser plugins, you might somehow loose lots of your clients, because most of the people dont want plugins getting installed. Also this means you need to make a setup and which checks the browser and installs the plugin accordingly. This is not easy to do.
Even if you write XBAP applications, it has security issues to read external device data from it.
Also I think you mentioned you will be using the software in LAN. So why not you access the device from the server side. You can access any device from the server side easily and send the data back to the client. Use almost the same code that you use in windows in the server side to get data.
|
|
|
|
|
Hello, Abhishek.
Thanks for your reply.
I have a query, What do you mean by saying Server-Side. Can you elaborate a bit.
See, the Web App is currently running on my PC in IIS6.0 and WinXP.
And regd. LAN issue, I am using this web App in LAN only.
So whether I use on my PC or any other PC, Both PC's and Device are in LAN.
|
|
|
|
|
Hey,
Let me clear you a bit. Whenever we talk about WEB there are 2 computers involved. One is server, where IIS is running, and the other is Calling Computer, which uses only browser to get the output.
It is very easier to add dll in the server side, or API calls from the server computer, but 30 times tough if you want it from the client using Browser.
If you have an option so that you can connect the device through LAN using network from your server, then its just paste the code that your windows program has(slight alteration might be needed) and get the work done easily. But if you want the client computer to use the lan, it would be quite impossible (At least have to create Browser plugin for API calls)
Hope you got my point.
|
|
|
|
|
I want to popup an aspx page from a function using the following code..
string strScript = null;
ClientScriptManager ClientScript;
strScript = "window.open('popupContent.aspx','new_Win','height=650,width=250,resizable=0')";
ClientScript.RegisterClientScriptBlock(this.GetType(), "popup", strScript, true);
But it's not allow me to compile..showing that
Error Use of unassigned local variable 'ClientScript'
How can i resolve this?
Thanks
Md. Marufuzzaman
|
|
|
|
|
string strScript = null;
ClientScriptManager ClientScript;
strScript = "window.open('popupContent.aspx','new_Win','height=650,width=250,resizable=0')";
this.ClientScript.RegisterClientScriptBlock(this.GetType(), "popup", strScript, true);
You do not need to define a new client script manager. Page class already has one
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Thanks for your help... but when i try as you suggest i get another error..
Error 1 ' does not contain a definition for 'ClientScript' and no extension method 'ClientScript' accepting a first argument of type 'GUInterface.SqlManager' could be found (are you missing a using directive or an assembly reference?)
I dont know why....
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
Thanks
Md. Marufuzzaman
|
|
|
|
|
Small change in your code:
string strScript = null;
ClientScriptManager ClientScript = Page.ClientScript;
strScript = "window.open('popupContent.aspx','new_Win','height=650,width=250,resizable=0')";
ClientScript.RegisterClientScriptBlock(this.GetType(), "popup", strScript, true);
View line number 2.
|
|
|
|
|
Zoki Manas wrote: ClientScriptManager ClientScript = Page.ClientScript;
Why to create a new object unnecesarily ?
Btw, I noticed your last name is Manas.
In Hindi, it means some one who is very close to heart. What does it mean in your language?
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
|
Manas Bhardwaj wrote: Why to create a new object unnecesarily ?
There's no object created there... just a reference to one which already exists on the Page class.
|
|
|
|
|
Manas Bhardwaj wrote: Why to create a new object unnecesarily ?
There is no harm in doing so.
|
|
|
|
|
|
Rather than using RegisterClientScriptBlock , it is better to use RegisterStarupScript
use
if(!this.ClientScript.IsClientScriptBlockRegistered("myscript"))
this.ClientScript.RegisterStartupScript(this.GetType(), "myscript", strScript , true);
Hope this helps.
|
|
|
|
|
Thanks.. Could you please tell me why RegisterStarupScript is better rather then the RegisterClientScriptBlock
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
Thanks
Md. Marufuzzaman
|
|
|
|
|
Make sure one things : if you have AJAX Script Manager in your page, then you have to use ScriptManager rather than ClientScript .
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Thanks for sharing...
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
Thanks
Md. Marufuzzaman
|
|
|
|