|
Hi,
I am working on a datalist control in which in which I have two server controls. One is Image Button and another is Hyperlink.
On running, an image and a text is coming in datalist.
Now I want that text in a variable.
Actually I am using:
protected void Image_Click(object sender, EventArgs e)
{
get_name();
string nam = (string)ViewState["Testnam"];
Response.Redirect("SubCategory.aspx?name="+nam);
}
public void get_name()
{
nam = DataList1.SelectedItem.DataItem.ToString();
ViewState["Testnam"] = nam;
}
Image _Click is the onclick event in image button in datalist.
How can I retrieve the text of that hyperlink.
Please assist me.Thanks in advance.
Cheers,
Nripendra
|
|
|
|
|
Hi There,
I have a problem.I am giving option to user to change the theme of web page.
and what I want to do is that I want to retrieve color of theme when user select that theme.Can anybody tell me.I am using Asp.Net 2.0 and C#.Net.
Thanks,
|
|
|
|
|
ArifShaikh wrote: what I want to do is that I want to retrieve color of theme when user select that theme
User should select Theme from any control. Means they can select by clicking a link , or from dropdown. Now if they selecting from dropdown , then you should no the value that what user selecting , based on that you can change the theme.
cheers,
Abhijit
|
|
|
|
|
Thanks For Reply,
I had succeeded in changing theme.My problem is that I want to retrieve main color of theme.
Thanks.
|
|
|
|
|
ArifShaikh wrote: y problem is that I want to retrieve main color of theme
From where User selecting the Theme color ?
cheers,
Abhijit
|
|
|
|
|
Thanks For Reply,
He is not selecting color he is just selecting theme from DropDown list box.But Actually I am showing my all error messages in div tag using javascript.When error comes it popup message in that div tag.I want to apply same theme to that Div tag.I am not able to do this thats why I was asking for retrieving color.So that after retrieving color I could pass it to my javascript function.If you know how apply theme to div tag then please tell me.
Thanks.
|
|
|
|
|
No... You are running on Wrong Direction !! You do not need to pickup the color. I believe for every theme name , you are having the Theme, and You are Changing the Theme. I am just giving you one suggestion , that Try to use HttpHandler , which will apply the theme to all of your pages, including popup at runtime. Do not need to pick the color and applying it.
cheers,
Abhijit
|
|
|
|
|
Thanks For Reply,
Can you tell where to find information to use HttpHandler to apply the theme to all of pages including popup.
|
|
|
|
|
Here It is[^]
Use session to store Theme Name, and Apply Change using HttpHandler .
Check This Two methods
context.Session.Add()<br />
context.Response.Redirect()
Now, Its on you to implement it. If I give you complete code, that does not help you to learn .
cheers,
Abhijit
|
|
|
|
|
I have a dropdown in UpdatePanel, while clikcing a particular field in the dropdown , some fileds should not be visible and these fields are in a seperate table, and this table has its own id, but while clicking a field in the dropdown the table is not disappearing, but if i remove the updatepanel of the dropdown its working properly,
Any Solution,
Plz help................
|
|
|
|
|
chinnumol wrote: while clikcing a particular field in the dropdown , some fileds should not be visible and these fields are in a seperate table, and this table has its own id,
You want to mean that when you select some value from dropdown list, based on that you want filed should be visible true or false. if yes,'
As you said, you have placed Dropdown list inside updatepanel , Did you place Those filed inside the updatepanel or not ? if no , then place then also . Because, when you change the content of Dropdownlist, then only it postback, not the other control of that page. Or even you can use multiple updatepanel and you need to change the updatemode="Conditional" and Explicitly update them when required.
chinnumol wrote: but if i remove the updatepanel of the dropdown its working properly,
Yes, The reason I have already discuss !!
cheers,
Abhijit
|
|
|
|
|
hi abhi,
I tried that also, I put the second table inside the update panel, while clicking a particular field in dropdown the fields in the second table should not display, I gave an id for the second table inside the update panel,
but not working, i put the code in the dropdown's selected index changed, if i remove both the update panel its working, I also tried the updatemode ="conditional"
wht to do?
|
|
|
|
|
If that table is present outside update panel then you have to put that table in another update panel.
|
|
|
|
|
Basically I have a main form and then child forms that are activities of the main form. What I want to do is instead of popping the child forms into new windows I would really like to do a modal DHTML popup as part of the original form... anyone know an easy way of doing this or something similar? Thanks
|
|
|
|
|
cwhittl wrote: would really like to do a modal DHTML popup as part of the original form... anyone know an easy way of doing this or something similar?
This[^] should make it easier if you can use AJAX toolkit.
|
|
|
|
|
Thanks for the post!!!
Do you know if there anyway to do it with forms? My forms are sorta special and I'd rather not have to re-write them into panels...
|
|
|
|
|
Well, AJAX tookit just makes the implementation easier. But you can implement same functionality without the need to that toolkit, but it requires more effort. Unfortunatly, I don't know any other methods.
|
|
|
|
|
Hi,
In the main page add the following Javascript in the .aspx form(design)
// register for our events
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginRequest);
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequest);
function beginRequest(sender, args)
{
// show the popup
$find('mdlPopup1').show();
}
function endRequest(sender, args)
{
// hide the popup
$find('mdlPopup1').show();
}
2. Add a Script MAnager and Update panel, Hidden field, ModalPopupExtender,button
<asp:updatepanel id="UpdatePanel1" runat="server" xmlns:asp="#unknown">
<contenttemplate>
<asp:hiddenfield id="btnHidden" runat="server">
<cc1:modalpopupextender backgroundcssclass="modalBackground" popupcontrolid="Panel1" xmlns:cc1="#unknown">
BehaviorID="mdlPopup1" TargetControlID="btnHidden" ID="ModalPopupExtender1" runat="server" DropShadow="true" >
<asp:button id="Button3" runat="server" text="Click" onclick="Button3_Click">
<%--<cc1:modalpopupextender id="Button3_ModalPopupExtender" runat="server" xmlns:cc1="#unknown">
DynamicServicePath="" Enabled="True" TargetControlID="Button3">
--%>
<asp:panel id="Panel1" runat="server">
3. Add code for the button on the (aspx.cs) page
protected void Button3_Click(object sender, EventArgs e)
{
Thread.Sleep(500);
Response.Redirect("MainPage.aspx");
ModalPopupExtender1.Hide();
}
4. In the page load add this
Panel1.Visible = true;
5. add css for modalpopup in the style sheet
/* Model Popup */
.modalBackground
{
background-color: Gray;
background-image: url(Images/indicator.gif);
background-position: center;
background-repeat: no-repeat;
filter: alpha(opacity=60);
opacity: 0.60;
}
Hope this will help You..
|
|
|
|
|
Hi,
I have created a sample web app for testing in .NET Framework 3.5, used web parts added grid view into web part on the page to display the data. the button & link click events on these controls does not fire on IE 7.0 such as edit, select, delete, buttons, paging & sorting in GridView and web parts restore button click events.
I have executed the same application on Fire Fox, which is working fine.
Please help me in fixing the problem how to run the same on IE 7.0
Shyam Sundar
|
|
|
|
|
The first step is to look at the generated HTML and work out how the button is working and why IE7 can't fire it.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
the button control on the form is working, it has onclick event, the grid view's pager template & data template button controls does not have click events.
does this mean that these controls should have server side events...
in such case, how this is working in Chrome and Firefox browser.
Is there any other cause...
|
|
|
|
|
Hi,
This is Srinivas, i am doing one web Application. so that i need to check the incoming mail has attachment or not to the admin email ID.
plz provide code Snippet
Thanks in Advance
|
|
|
|
|
Hi
Please read this
http://www.codeproject.com/KB/IP/despop3client.aspx
Marcello Turnbull
|
|
|
|
|
HI,
Thanks to provide the link as per my request.
I study the code ,and i understood but i can not know where i can write that code
I am beginner , so that plz tell me where can i write the code.
|
|
|
|
|
Hi all, I have a problem with event onclick i don't know why this event is fire 2 times when I make click in 2 place diferent.
I put the little code for best sample:
Dim linkVer As LinkButton = CType(e.Row.Cells(0).Controls(2), LinkButton)
'This button go to a url
linkVer.Attributes.Add("onclick", "javascript:window.open(" + url + "," + parametros + ")")
'this is a link to other page in the same gridview but in other cell and is controlled by event gridView_SelectedIndexChanged
e.Row.Cells(8).Attributes.Add("onclick", Me.ClientScript.GetPostBackEventReference(gridView, "Select$" + e.Row.RowIndex.ToString()))
The problem is that when I push the button linkver the program open url of linkver and url of e.row.cells(8)
Some idea?
thanks for all guys
|
|
|
|