|
|
Try following:
<asp:LoginName ID="loginName" Runat="server" />
string str = loginName.Text
Hope this helps you!!!!!
-- modified at 7:41 Monday 31st July, 2006
- ashish
|
|
|
|
|
hi
are You using Login Control of Asp.net then Go to Properties of Login Control and Find the Loginname then u can use the value of Loginname.
like
string str= Loginname.text
i hope i got ur problem if not then tell me
byee
-- modified at 7:47 Monday 31st July, 2006
|
|
|
|
|
There is an error. 'System.Web.UI.WebControls.LoginName' does not contain a definition for 'text'
thanks in advance. Much appreciated.
|
|
|
|
|
Hello, This is my problem i have a GridView to show bound Data, but i want to edit insert data to but with a form that is inside a Grid view is it possible.
|
|
|
|
|
Use a TemplateField instead of a BoundField for maximum control over the editing template.
|
|
|
|
|
|
|
I want to delete all details of visisted pages from my browser.How should I?
|
|
|
|
|
|
do u want to remove it programatically or by simpling clearing the history of the browser.
Vipin
|
|
|
|
|
I want to clear it by programatically(C# or JavaScript).
Thanks
|
|
|
|
|
Hi.. Good Day..
I have a question about how to get different field values from database and combine both of these values and display it in the textbox.
I use the SqlDataReader to read data from database. The way i use to assign data from database into textbos is like below :
txtBookTitle= myReader.GetValue(2).ToString
Can anyone give me a solution how to combine 2 values get from database and dispaly out in a textbox. Thanks....
Best Regards,
Pei Sun
|
|
|
|
|
txtBookTitle.text = myReader.GetValue(2).ToString() & myReader.GetValue(2).ToString()
That should concatenate two strings. For numbers, you should cast to the number and use a + sign instead.
|
|
|
|
|
Thanks for your help. it's work ! Thanks so much..
Best Regards,
Pei Sun
|
|
|
|
|
I hav a DataView object named dv. It gets its data from a DataTable named tbl.
It has three columns: col1,col2,col3. I populate a ListBox object named lstItems from it in the following way:
...
Dim dv As New DataView
dv.Table=tbl
lstItems.DataSource=dv
lstItems.DataValueField="col1"
lstItems.DataTextField=DataBinder.Eval(dv,"col2,col3")
lstItems.DataBind()
It want col2,col3 values to be displayed in as a single item listbox.
it gives error on reaching to DataBinder.Evel() method.
Can someone help me how to solve this problem.
Thanks
|
|
|
|
|
You can use the DataBinder in this way as the DataTextField is where you specify a single data field. IMO, your chances are:
+ Manage to add the ListItem in the Items collection and you can combine the two columns.
+ Rearrange the datasource to have a column that is the combination of the two columns.
|
|
|
|
|
|
|
you can write a function to combine the two fields with comman and then use that function in DataTextField.
like,
string Combine(object o1, object o2)
{
return o1.ToString() + "," + o2.ToString();
}
you can use
lstItems.DataTextField = Combine(DataBinder.Eval(dv, "col2"), DataBinder.Eval(dv, "col3"));
Thanks,
Pradipta.
Pradipta Basu
|
|
|
|
|
Hi all,
I want to store contents to database from Textarea, Sometimes the user put's the HTML tags in the textarea, this makes a little confusion in the design while retriving the data. Is there any options to remove all the HTML tags before storing the data's in the database?, I am doing this work in ASP.NET with VB.NET.
Please guide me.......
Regards
Exelio
|
|
|
|
|
Hi there,
The common way is to keep saving data as it is in DB, but when you display on the web page you can use the HttpUtility.HtmlEncode encode the html markup in data.
|
|
|
|
|
Before doing it you have to write ValidateRequest="false" in the page directive.
The problem is that it provides an option for HTML injection.
Pradipta Basu
|
|
|
|
|
Hi everybody!!
I want to play some audio files in my project. Audio-Files should be stored in database , first it will read from databse then play this file.
Can anyone tell me how to do this.
Thanx n regards
|
|
|
|
|
Hi there,
Basically, to play the media file on the web page you can host the player on the page with the object tag, and assign the url of the media file to the player. You can use the search functionality of the site to look for the sample code as this question was answered many times at this site.
|
|
|
|