|
How can i bind values to a textbox using C#?
Gautham
|
|
|
|
|
But Why you want to bind it to textbox ?
Why can't you directly assign values directly to TextBox.Value property ?
<l>Thanks and Regards
Sandeep
|
|
|
|
|
Sandeep,
Let us take this case:
There is a text box in a datagrid.
We can do it using the FindControl method i guess but,
Is there a way like we do for labels?
Example:I have a label1 in my datgrid and if i want a value to be assigned to the label from the databse i give databinder.eval(container.dataitem,"xyz")
Can this be done to the textbox too??
Gautham
|
|
|
|
|
i think you will have to overload that databind method
i have not done it but see following code as a sample
object bound_value_obj = null;
Control ctrl = (Control)sender;
IDataItemContainer data_item_container = (IDataItemContainer)ctrl.NamingContainer;
bound_value_obj = DataBinder.Eval(data_item_container.DataItem, FieldName);
switch (ItemType)
{
case ListItemType.Item:
Label field_ltrl = (Label)sender;
field_ltrl.Text = bound_value_obj.ToString();
break;
case ListItemType.EditItem:
TextBox field_txtbox = (TextBox)sender;
field_txtbox.Text = bound_value_obj.ToString();
break;
}
<l>Thanks and Regards
Sandeep
|
|
|
|
|
|
Hi all,
Can anyone tell me how to get the currency symbol of India .i.e 'Rs' using System.Globalization .I can only find the currency symbol in Hindi,Telugu,Tamil etc but not in India-English.Also not all the nations currency symbols are available for eg:Bangladesh,Cyprus etc ...How to get those?
If anyone knows the answer please let me know.
Thanks in advance
Koushik
|
|
|
|
|
hi
i am developing an app in which i have to place different size of images on different portions of a page based on there width and height for that i have to recognise there size b4 displaying and i dont have images too they are dynamically changed on there urls i have only there urls i used the following method b4 but it dont work for urls
System.Drawing.Image fullSizeImg = System.Drawing.Image.FromFile("c:\abc.jpg");
then
imgWidth = fullSizeImg.width;
but it dont work for
System.Drawing.Image fullSizeImg = System.Drawing.Image.FromFile("http://images.apple.com/itunesaffiliates/US/2005/12/6/NBC/180x150_BattlestarGalactica.jpg");
can any one guide me in this regard or tell me if there is any alternative for this
looking forward
thanks
shezi
|
|
|
|
|
I guess there is an article related to create a thumbnail for an image, using that code snippet you can play around with the size of the image.
Search for it!!!
Gautham
|
|
|
|
|
I have done it for showin one image in a new window and it works you can check it on http://www.1st4beds.co.uk to see large picture of the products.
You have to use image server control and make its height and width 0 and then pass image height and width as you are doing.
It should work
Naveed Kamboh
|
|
|
|
|
Hi to all,
I have a problem with a web application(asp.net). We have two networks. one is our client network and another one is our offshore network. We deployed a new project in client's place(client network). This application working fine in client network. But I want to access that web application from my offshore network, I am getting some problem.
when we enter the URL, Main page is displaying fine. But we click the Add button,and no process is going around.
How can I resolve this one. Can I change any security changes in offshore server.
Regards,
Bhasker P
|
|
|
|
|
No one can tell you what exact gone wrong Many possibilities
Security,Configuration,environment,host files ...........
<l>Thanks and Regards
Sandeep
|
|
|
|
|
I want to use webparts in my application
but i dont want to use sql as backend so it shows error
if i took webpart what can i do??
|
|
|
|
|
It is not possible at all. We have to use, because web parts needs database to store personalization information.
M.Sendilkumar
|
|
|
|
|
ya but suppose i want to use oracle or mysql as backend then
|
|
|
|
|
|
How to validate user id and password in asp.net using c# ???
|
|
|
|
|
|
|
HI
It depends totally on your application Where is your data stored (database or else where)
i think you are new to C# please google it !!!!!!!!!
<l>Thanks and Regards
Sandeep
|
|
|
|
|
Hi..
Thaks for u r replay..
u r correct- i am new to c#.i want to store my data in database.
Thanks and Regards
vnss..
|
|
|
|
|
Hello everyBody,
Friends me facing a problem in redirecting the url.
me make is site working with http://localhost/abc/testing is working fine but
i want to run this site with http://localhost/test
how to do this pls help me....
WAITING.....
REGARDS
RAHUL
rahul saini
|
|
|
|
|
creat new virtul directory on iis with mane test
|
|
|
|
|
Hi
First thanks for ur rply,
I hav done dis but i m getting error (The resource cannot be found.)
actually all the sites are in wwwroot/abc/test
and i want to run test with url http://localhost:/TEST/Default.aspx
but not working
it is working with http://localhost:/abc/TEST/Default.aspx
pls tell which path should i giv for virtual directry
REGARDS
RAHUL
rahul saini
|
|
|
|
|
go to control panel in that adminisrtative tool inthat iis
under that websit under that default websiet right click on it u find potion to creat new virtul directory giv alis name TEST and go further ..
|
|
|
|
|