|
its ok.... thanks for reply..
but i want asp table and i generate it dynamically so the asp button on which i want to show modal popup also
generated dynamically...
so how can i show modal popup on it..???
for testing i create one test.aspx like this...
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="test.aspx.vb" Inherits="test" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript" language="javascript">
function onOk(){
return true;
}
function ShowModalForNew(){
var myBehavior = $find('mpe');
myBehavior.show();
$find('mpe').show;
}
</script>
</head>
<body>
<form id="form1" runat="server">
<ACT:ToolkitScriptManager runat="server" ID="ScriptManager1" EnableScriptGlobalization="true" EnableScriptLocalization="true" />
<div>
<asp:UpdatePanel ID="uptmp" runat="server" UpdateMode="conditional">
<ContentTemplate>
<table>
<tr>
<td>
<asp:Button ID="Button1" runat="server" Text="Button" />
<a href="#" style="display:none;visibility:hidden;" onclick="return false" id="dummyLink" runat="server">dummy</a>
</td>
</tr>
</table>
<act:ModalPopupExtender ID="ModalPopupExtender1" runat="server"
TargetControlID="dummylink"
popupcontrolid ="Panel1"
backgroundcssclass="modalBackground"
dropshadow="True"
cancelControlId="CancelButton"
BehaviorId = "mpe" />
<asp:Panel ID="Panel1" runat="server" style="display:none; width:200px; background-color:White; border-width:2px; border-color:Black; border-style:solid; padding:20px;">
Are you sure you want Delete Text?
<br /><br />
<div style="text-align:right;">
<asp:Button ID="OkButton" runat="server" Text="OK" />
<asp:Button ID="CancelButton" runat="server" Text="Cancel" />
</div>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>
and i called the javascript thr codebehind like this,....
Partial Class test
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
Button1.Attributes.Add("onclick", "ShowModalForNew();")
End If
End Sub
End Class
if you run this it shows, modal popup but, it get disappeared...
if it worked properly, then i can add attribute to the dynamically generated asp button, as shown in code behind....
now you get what i want..? but thanks for reply... it also helpful to me related to modal popup extender...
madhuri
|
|
|
|
|
Ok i understand your problem! I had try your test.aspx and asign the modal pop up dinamically and use it with javascript is a problem... unless you work with datagrid. I personally recommend u to use a gridview and fill it dinamically like the asp table you use... Why i'm recommending this? is just because the asp table isn't have any event (in the server) that helps you in your problem, with gridview you only add the 'ShowSelectButton = true' and program (in server side) the OnSelectedIndexChanged (of the grid) the modalPopUpExtender.show(); and that's all! i think...
greetings
|
|
|
|
|
Sorry for delay...
thanks for suggestion but its requirement that use asp table instead of gridview.....
Your suggestion is useful.... but its requirement.. so can't use gridview...
but i can't understand, when i tring to call the javascript through script manager it didn't get
behaviour id of modal popup extender....thats why it shows 'null' error
Plz give me solution on it, as i give test example... plzzzz
help me....
thanks and regards,
Madhuri.
|
|
|
|
|
Hi,
In ADO.Net after finishing codeing, for deployment we can make setup(msi) for that project.
So can't I make some similar like setup to my ASP.Net website. Each and every time I have to run my complete website in Visual studio(Ctrl+F5). I don't know about deployment of website on Internet. I just want to know how can I run my website without Visual Studio by just double click to the website. Is it possible???
TIA
Regards,
Jaym
|
|
|
|
|
Only Executables can run when you double click. I think you need to read the basic books on Web based Client/Server architecture.
You need to host it to IIS and you might create a shortcut to the website to run it.
|
|
|
|
|
Why you are asking same question again and again ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Hi,
In ADO.Net after finishing codeing, for deploment we can make setup(msi) for that project.
So can't I make some similar like setup to my ASP.Net website. Each and every time I have to run my complete website in Visual studio(Ctrl+F5). I don't know about deployment of website on Internet. I just want to know how can I run my website without Visual Studio by just double click to the website. Is it possible???
TIA
Regards,
Jaym
|
|
|
|
|
JayPatel21 wrote: I run my website without Visual Studio by just double click to the website
What do you mean double click? A website is a website. It is not an executable like console or windows application.
You need to deploy the website in IIS. Search google on how to publish website in IIS and you will get a lot of articles explaining that.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
|
Is there any shortcut to get applicationname in asp.net?
Please don't forget to mark 'Good Answer', if you find it really a good one!
Kashif
|
|
|
|
|
Gamzun wrote: Is there any shortcut to get applicationname in asp.net?
I didn't get you? What application name you are asking about ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Try this :
Request.ApplicationPath.Substring(1,Request.ApplicationPath.Length-1)
|
|
|
|
|
Sorry my mistake, I didn't ask clearly in first place. I've a provider in web.config and in that ApplicationName is placed. My question was, is it possible to get that name?
Please don't forget to mark 'Good Answer', if you find it really a good one!
Kashif
|
|
|
|
|
Yes.. If you placed the Application name in web.config, use
ConfigurationMageanr.AppSettings to get it.
|
|
|
|
|
Thanks but I was talking about application name in provider
Please don't forget to mark 'Good Answer', if you find it really a good one!
Kashif
|
|
|
|
|
Hi,
i'am looking for a hint how i can create something similiar to the article search on this website.
My goal is to enter a seach string in a textbox and after every keystroke i want the filtered resultset in a listbox.
If possible evterything should be done programatically without a webservice if possible.
Regards, Alex
|
|
|
|
|
From where do you want to search ? Its from web site content or from database ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
I want to search from a database
|
|
|
|
|
generally no web service is required to create search functionality in a website.
Use normal sql to find elements. Code purely based on how the database schema is and how you are going to facilitate the functionality.
|
|
|
|
|
Hi All,
I am getting below error while building my Application. can anyone help on this.
Error 1 Failed to start monitoring changes to 'C:\..\global.asax' because access is denied.
fttyhtrhyfytrytrysetyetytesystryrty
|
|
|
|
|
When your are getting this error ? Your site is running from IIS or Visual Studio ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Hi abhijit,
i am running that site from visualstudio
fttyhtrhyfytrytrysetyetytesystryrty
|
|
|
|
|
friends,
i am facing problem related to my asp.net website
http://www.proxdubai.com/[^]
when i open this website on Firefox it gives me error
"
Reported Attack Site!
This web site at www.proxdubai.com has been reported as an attack site and has been blocked based on your security preferences.etc....."
can any one guide me how to resolve this issue and one more thing when i replace my default.aspx or home.aspx ,first.aspx
whatever my default page is on the server this problem goes aways..
any help would be appriciated.
Http://www.gen-sys.com
Government Dyal Singh College Lahore.
|
|
|
|
|
Did you read the message by clicking on "Why was the site is blocked?" button ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
yes i did but still dont understand why that occured
Http://www.gen-sys.com
Government Dyal Singh College Lahore.
|
|
|
|