|
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.
|
|
|
|
|
Pls help me understand why is that when using server.transfer the previous page is displayed in the url address of the browser.
For example, login.aspx is displayed in the browser. When login button is clicked, server.transfer(mainmenu.aspx) is called.
When the mainmenu.aspx is displayed on the browser, the url address displayed
is still the url of login.aspx. Becaus of this my sitemap is having problems in getting the correct current node. Pls help. Thanks.
|
|
|
|
|
The Server.Transfer method redirects the web page at the server side, so it does not update the new url in the address bar. In this case, you might consider using the Redirect method instead.
|
|
|
|
|
ok thanks. for the explanation.
|
|
|
|