|
Hey,.... I have a better solution than your link.. .
DbNull.Value.ToString returns empty string.
|
|
|
|
|
Your (so-called) tips sucks. Get lost from here you dumb.
|
|
|
|
|
Hi Experts
I Have used stringBuilder To Fetch Data.....i want to bind that data to any of my html control which is on .htm page....Please Help
In Short i want to just Find a Control on my html page and Bind the data to that control
Please Help.........
modified on Thursday, November 5, 2009 4:28 AM
|
|
|
|
|
Please elaborate in detail what exactly you're trying to do.
|
|
|
|
|
I want to generate HTML Report....
i.e when a button is clicked on .aspx page , i want to open a html page and display the fetched data from the database....
Thanks in adv..
|
|
|
|
|
Rohit,
Which type of html control u have on ur page?
Why r u not using SQL Server to fetch the data.

|
|
|
|
|
Hi Deepak
I have to just display data on any control on HTML page
m using Sql 2005
|
|
|
|
|
Rohit,
First clear me that what page u r using .html or .aspx
If U r using .aspx page,then data can be bound to dropdown list from db by using SqlDataSource.
Is it so?

|
|
|
|
|
m using .aspx page and on the button click of .aspx page i want to display the html page , and on that html page display the data...
http://www.codeproject.com/script/Forums/Images/smiley_cry.gif
|
|
|
|
|
Do like as...
On btn click use Response.redirect("name of page to redirect to") method.
U will go to .html page. In this method u can use Query string of related data to fire query on html page to fill the data to the control on this page.
Is there any control on .htm page which support data binding property?

|
|
|
|
|
then why are you using stringbuilder use data source like datatable, fill it with the data and bind it to the controls' source.
|
|
|
|
|
i want to bind that data to an html control which is on another html page,and my html control is not on aspx page....then how should i bind ???
|
|
|
|
|
How are u managing the call to the Page?
U need to pass the data/parameter from calling page to your called page and u can handle it on the page as per your need.
|
|
|
|
|
m calling response.redirect(index.htm)
ya i need to pass data/parameter....but could not do so.....
|
|
|
|
|
are you getting any error?
|
|
|
|
|
Can u please tell me how to pass the parameter......
m not getting any error
|
|
|
|
|
use query string or sessions to pass value
Response.Redirect
("index.htm?username=" +
TextBox1.Text = Request.QueryString["username"].ToString();
|
|
|
|
|
How could i use TextBox1.Text on HTML page....
TextBox1.Text = Request.QueryString["username"].ToString(); ???????
|
|
|
|
|
So you've to manually handle/manipulate the string data by JavaScript and feed it to the control.
|
|
|
|
|
To obtained by plain HTML (no ASP.NET needed):
Although this is definitely not the best practise.
And am still not very sure if this is what you are looking for.
< html >
< head >
< title>index< /title >
< meta http-equiv="REFRESH" content="0;url=http://www.xyz.com/xyz.aspx" >
< /head >
< body >
Index page.
< /body >
< /html >
using a JavaScript code:
< html >
< head >
< title >index< /title >
< /head >
< body >
< script language="javascript" >
window.location = "http://www.xyz.com/xyz.aspx";
< /script >
Index page.
< /body >
< /html >
|
|
|
|
|
Hello All
i've a usercontrol with alot of items i want to customize it for each individual page ,for instance making some textboxes,buttons invisible in a particular page , how to?
thanks
modified on Sunday, November 8, 2009 1:39 AM
|
|
|
|
|
What is the problem. Expose some properties from the usercontrol to set it from any page.
|
|
|
|
|
check the properties of the user control you are using. Also u can add controls to it like text box etc , if it supports them and then set the properties as per you requirment. If the user control doesn't support then change to a custom aspx control as per your requirments.
|
|
|
|
|
Thank you sir , but i was thinking of having a sub that handles all the control intead of exposing each individual item , i vame up with this sub , and it works just fine
Public Sub _DisableCont(ByVal Cont_Str As String)
Dim _Control As Control
For Each _Control In Me.Controls
Dim _ControlToString As String = _Control.ToString
If _ControlToString = Cont_Str Then
_Control.Visible = False
End If
Next
End Sub

|
|
|
|
|
Just see you have already did yourself. Our main motive is to help you to solve your own problem yourself.
Just to add to your solution, if you need any particular control to do something else check using this :
If TypeOf(_Control) is TextBox Then
Dim tb as TextBox = DirectCast(_Control, TextBox)
tb.ReadOnly = True
End If
You might also take Select Case in account for this scenario.
Cheers.
|
|
|
|