|
Perhaps you should reply to the original poster instead?
---
b { font-weight: normal; }
|
|
|
|
|
|
use the sql statement
sample "select * from data where name is not null"
|
|
|
|
|
hi,
I have two usercontrol on same page. 1.ascx and 2.ascx on abc.aspx . Now I need to access dropdown on 1.ascx frm 2.ascx . Plz help me how can i do this?
I have tried Page.findcontrol but as a user control inherits usercontrol class and not page class . its not giving reference to proeprty Page.Findcontrol. I can do page.findcontrol on aspx page but I need to do it on ascx only.
plz helpp
regards,
max
|
|
|
|
|
I'd tend to use delegates to allow events in one control to communicate something to the main page, which can then pass the info on to the other control as appropriate.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
can u plz show with some code or e.g
|
|
|
|
|
Do you not know how to use delegates ? Google has lots of examples...
public class UserControl1
{
public delegate void PassAString(string s);
public PassAString OnPass;
public void SomeEvent(object sender, EventArgs ea)
{
if (PassAString != null) PassAString("this is the value");
}
}
public class Form1
{
protected UserControl1 u1;
protected UserControl2 u2;
private void GetAString(string s)
{
u2.TheString = s;
}
private void OnLoad(//etc
{
u1.OnPass += new UserControl1.PassAString(this.GetAString);
}
}
So, the main form hooks up the event, and when it fires, it takes the value it's passed ( whatever that is ) and sends it to the other control.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
|
The FindControl method looks for a control in the scope of the current naming container, here is the Page instance, so you need to get reference to the naming container of the dropdownlist, maybe the 1.ascx user control, then you can call the FindControl method. However, like Christian said you'd better use the event/delegate to communicate the user controls, it's much more flexible.
|
|
|
|
|
How to reload a webpage when the reset button is pressed? i cannnot use response.redirect because my webpage have session.
Best regards,
Chee ken
|
|
|
|
|
you can call a javascript method on click of a button and in that method u can use window.reload() or window.refresh()
or u can set window.href = "same page's url"
for e.g
function abc()
{
var sURL = unescape(window.location.pathname);
window.location.href=sURL;
}
|
|
|
|
|
max_dev2006@yahoo.com wrote: window.reload() or window.refresh()
The code to use is window.location.reload(true);
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
Here's the thing: I have a clickable row under "DEPTNAME". What I want to do is when user click on a particular row i.e consultantdept, it will go to the other page and trigger the dropdownlist to select consultantdept and automatically generate a datagrid that display all data in table A that has consultantdept as a deptname. anyone can teach me how to do that?
Your help is greatly appreciated..
|
|
|
|
|
You can provide a client side handler for the onclick event of the clickable row, and in the handler you simply redirect to the next page with the id of the selected consultantdept stored in the query string. In the next page, you can query the selected id to populate the dropdownlist as well as the details datagrid (or gridview) control.
|
|
|
|
|
i want to know how i could create tabs in a web form?and wen those tabs are clicked how can i have different pages for each tab.
|
|
|
|
|
In the ASP.NET 2.0, you can use MultiView control to create a custom TabStrip control, here is an article[^] posted at CP. In addition, you may also consider a third party component, clickety[^].
|
|
|
|
|
Man u can create tabs using html table, javascript and css.
Do good and have good.
|
|
|
|
|
Hi,
You can use the TabStrip Web control and create tabs in it.
For having different pages in it, you can use Multipage web control and you can have different pages in multipage and each page can be linked with each tab.
rmr
|
|
|
|
|
I am using cookie session (cookieless="false"). In Internet Explorer it works correctly. But in Firefox I have a problems. Any ideas? Thanks in advance.
YKoltsov
|
|
|
|
|
YKoltsov wrote: But in Firefox I have a problems.
That is way too much information. Could you be a bit less specific?
If you could say anything at all about what kind of probem you have, it might be possible to say anything about it.
---
b { font-weight: normal; }
|
|
|
|
|
It look like beginner problem but i couldnt solve it
dropdownlist with three members
MEMBERS -- VALUES -- INDEX
City 1 ---- a -------- 0
City 2 ---- b -------- 1
City 3 ---- c -------- 2
How i could obtain the index, if i know the value or the string Member??
keep Learning and you never will be out of date...
|
|
|
|
|
Hi
For this you could use a for loop to check the index of the selected text.
like
private void DropDownList1_SelectedIndexChanged(.. , ..)
{
string val=DropDownList1.SelectedItem.Value ;
int index=0;
for(int i=0;i< DropDownList1.Items.Count;i++)
{
if(val == DropDownList1.Items[i].Value)
index= i;
}
}
I hope this solves the problem.
Luck is Opportunity with hardwork
|
|
|
|
|
|
Basically, if you want to determine the index of a particular item, you can walk through the Items collection of the dropdownlist to the trick, and for the selected item you can simply use SelectedIndex property.
|
|
|
|
|
I am transitioning into developing ASP.NET web applications from C# Windows applications. Particularly, I am converting a Windows application that I created in C# to ASP.NET. This application simply moves a data file from the user’s workstation to a predefined location on the network, creates and executes a DTS package, and a few other processes are carried out before ending. My question is, how, or what, is the best way to keep the user informed of the progress?
In the Windows app I created an event that simply updated a label. I don’t think that will work in a web environment though???
|
|
|
|