|
well hi had a similar problem because i wanted to add dynamic questions on an registration form the solution this.
in your solution is this you must have an hiden field to store the number of control that you have to generate.
the second part is this when o do the postback you have the view state but you dont have the controls so you have to create them in the page init (is where the controls from what i have eard is bound width viewststate.
Note that you have to have exacly the same name. if you want to have events you have to asssign them in the page init to.
if you have master pages (asp.net 2.0) the controls may change name because o the contentplaceholder.
this is the article that i used to resolve the problem
http://www.codeproject.com/aspnet/retainingstate.asp
(note there is an error is not in the page_load but in the page init watch out).
http://www.codeproject.com/useritems/dynamiccontrol.asp
|
|
|
|
|
Hi One & All
This is Naren, I need some small help regarding PageIndex "ToolTip". I got for Header , items but i couldn,t find to get ToolTip for Pageindex .
So plz help me to get the solutions.
I m working in Asp.net with C# web Application.
I wrote some code in datagrid_ItemCreated() ie.,
private void dgEmp_ItemCreated(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if((e.Item.ItemType == ListItemType.Pager))
{
e.Item.Cells[0].ToolTip = "Click to get this page"+Currentpageindex;
}
}
This we wrote for PageIndex ToolTip.
"Output" which i m getting is ""Click to get this page 0" for all pageindexes.
So Plz tell me the solutions to do.
Thanking U,
Naren.
please help me
|
|
|
|
|
You need to have a look at the inner of the Cells and get reference to the hyperlink elements which represent the page indexes, you then can set the tooltip for each element.
|
|
|
|
|
Hi,
I need to develop a page with a TreeView control, in which I need to populate data from only a single table.
The requirement is like this: -
1) I have a Date from and Date To option on top of page, where user will specify the date range.
2) There is a Arrange by date and Arrange by process radiobutton, depending on which I need to make the parent node of TreeView and correspondingly arrange data.
The table from where I will fetch data has a structure like this
Column1 + Column 2 = Composite Primary key (neither of which has to be shown as node or child node in the TreeView)
Column3 = Date Column (To be made parent if Arrange by Date radio is selected)
Column4 = Process Column (To be made parent if Arrange by Process radio is selected)
for each date / process child node there will be a batch id node which will become its 3rd level child node.
How do i achieve this in actual? What shld be the query like? what shld the actual logic be like ?
Pls guide me on this
Thanks in advance
|
|
|
|
|
The link in MSDN may get you started, also if you don't know how to write the query you may want to post the question in SQL forum.
TreeView control[^]
|
|
|
|
|
hi, i am using a datalist control which is in another <itemtemplate> of a datalist control.
the inner datalist control has a edit button but i am not able to call the protected override event for the inner datalist control?? how to fire the edit command event of the inner datalist control.
|
|
|
|
|
How do you define the edit button of the inner datalist control? You can also look at the ItemCommand event of the inner datalist control and do a checking on the command name.
|
|
|
|
|
Hi Friend,
I am using Master Page and writing some information on master on dropdownlist_selectedindex
event.
I want to write some values from database to master page on this event and then redirect to an other pages.
Problem is when i redirect it doesnt write information on master page and if i remove redirection line it does.
I am not gettig the sequence of events here.
which event will be best to redirect after writing information to the master page.
any help will be appriciated.
thanks
Naveed Kamboh
|
|
|
|
|
Naveed Kamboh wrote: I want to write some values from database to master page on this event and then redirect to an other pages.
Problem is when i redirect it doesnt write information on master page and if i remove redirection line it does.
Off course, when you redirect the master page reloads. You will need to load the data to the materpage after you redirect. Anytime you redirect to a new page the ViewState of the masterpage is recreated.
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things
--thedailywtf 3/21/06
|
|
|
|
|
Thanks dear but problem is when i redirect to page its goes to that page but does not update informaton on master page
let me xplain my problem again.
M1=Master page
ddl=dropdonwlist on master page
c1=another aspx page which uses master page graphics and info.
variable address;
adress="abc"
at the bottom of master page i wrote like <%=Response.write(address)%>
now i want to redirect my c1 page using ddl index and also change value into address variable which must be updated on to master page.
as ddl's selected index fires at end thats why its not updating information on master page.
any idea to perfrom the task please.
Naveed Kamboh
|
|
|
|
|
use page.master.findcontrol()
You can update any control in the master page at any point. The preRender event is a good place to make sure the update will "stick".
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things
--thedailywtf 3/21/06
|
|
|
|
|
Sorry i am not getting what do you mean.
Naveed Kamboh
|
|
|
|
|
Thanks dear,
I have sorted,
I used a class property to store the value of selected index and it done all work for me.
thanks
Naveed Kamboh
|
|
|
|
|
In the codebehind page of the content page you can update any control on the master page.
for example
<br />
TextBox txt = page.master.findcontrol("txtOnMasterPageID");<br />
txt.text = address;<br />
Now you can run this code write before the page is rendered
for example
<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
this.PreRender += new System.EventHandler(this.Page_PreRender);<br />
}<br />
protected void Page_PreRender(object sender, EventArgs e)<br />
{<br />
{<br />
TextBox txt = page.master.findcontrol("txtOnMasterPageID");<br />
txt.text = address;<br />
}<br />
}
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things
--thedailywtf 3/21/06
|
|
|
|
|
I want access server side of textbox information in javascript function .
i am doing final year mca .i want source code with demo project with source code.
|
|
|
|
|
You look up the getElementById method in MSDN or online tutorials to see how to use it to get reference to an element at the client side based on the element id.
|
|
|
|
|
Hi,
I have a range validator on my page. It's validating for an integer value whoose datatype in the database is bigint (–9,233,372,036,854,775,808 and +9,233,372,036,854,775,807) or (0 and 18,446,744,073,709,551,615 )
Now, for the range validator the interger value has a preceision of Int32 (-2,147,483,648 to 2,147,483,647 ).
How can I extend this max integer value of the validator to validate for bigint values?
Minu
|
|
|
|
|
I think this might be a javascript limitation, found this on the web:
"Modern JavaScript/ECMAScript implementations supports the use of integers up to 53 bits in length, which gives a maximum integer size of slightly larger than 9,000,000,000,000,000"
|
|
|
|
|
Can you explain that? As I know the Integer value in the validator comes from System.Int32. How does JavaScript come into picture here?
Thanks
Minu
|
|
|
|
|
The client side validation on a web form is performed by javascript that the validator controls create.
|
|
|
|
|
I am dealing with a web application with forms authentication.
In login form Userid,password options are there.
when the user enters his userid and password,they are checked against the database.If the user is valid then he is allowed to access tha site.
so how to configure the web.config.
Please help me
|
|
|
|
|
|
<authentication mode="Forms">
<forms loginurl="WebForm1.aspx" name=".ASPXFORMSAUTH">
<authorization>
<deny users="?">
|
|
|
|
|
I'm having problems accessing a MS-Access Database from within ASP.NET (Visual Studio 2003). The program itself is in "C:\Inetpub\Guest", and I've created the database at "D:\databases\guest.mdb".
When I run the program I get an error on the line:
OleDbConnection1.Open()
It says:
We can't find "http://localhost/DBTest1/frmMain.aspx"
Error - Internal server error
I took off "friendly messaging" for the browser, and now have a more descriptive error for this problem. It says:
The Microsoft Jet database engine cannot open the file 'D:\databases\guest.mdb'. It is already opened exclusively by another user, or you need permission to view its data.
I have just rebooted the PC, so it cannot be opened exclusively by another user. When I define the Connection String in the OleConnection1, I have:
Provider Tab
------------------
a) Microsoft Jet 4.0 OLE DB Provider
Connection Tab
-----------------------
a) I select the database "guestbook.mdb"
b) User name: Admin
c) I click on "Blank password", but not "Allow saving password"
Advanced Tab
--------------------
a) I choose "Share Deny None"
When the wizard is about to close I select: "Include Password"
This didn't work, and I've played around with the settings, but to no avail. What's wrong?
Thanks
|
|
|
|
|