|
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
|
|
|
|
|
Solved
I have changed this
e.Row.Cells(8).Attributes.Add("onclick", Me.ClientScript.GetPostBackEventReference(gridView, "Select$" + e.Row.RowIndex.ToString()))
by this
e.Row.Cells(8).Attributes.Add("onclick", "window.location='NuevoExpediente.aspx?Id=" + e.Row.Cells(6).Text + "&Nuevo=0" & "'")
because always fire the event gridView_SelectedIndexChanged, now all is more easy
regards
|
|
|
|
|
Hi all
How can i make a colander type of box and put A, B, C, D up to Z in .net website.
Thanks in advance
|
|
|
|
|
reogeo2008 wrote: How can i make a colander type of box and put A, B, C, D up to Z in .net website.
Frankly , I didn't get your point ? Are you trying to create some table and put A, B, C...bla bla on that or something else ?
reogeo2008 wrote: colander type
cheers,
Abhijit
|
|
|
|
|
I have Alphabets a to z on the home of my websitte for displaying adverstisement links.By clking on an alphabet i have to display all the links starting with that letter.Now I need a colander type of box and put A, B, C, D up to Z to do the same
can you help me out in this.
Thnak You for your timely reply
|
|
|
|
|
What you need to do, is sort your links by the first letter, then show the letters as links. Make them all link to the same page with a querystring like MyColander.aspx?letter=A
Then you can write one page that gets the letter, passes it to the database and returns just those links. Just write a proc that returns a LIKE query using that querystring value, then you could also support any sort of substring search
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
A colander[^]? I don't know what you mean, a "colander" type of box doesn't make any sense at all to me.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi,
How to remove the blank spaces in middle in the string using asp.net 2.0
Example
Reminder 1 replace Reminder1
|
|
|
|
|
shanthi jothi wrote: Example
Reminder 1 replace Reminder1
string strOrginal = "Reminder 1";
string strReplace=strOrginal.Replace(" ","");
BTW : Its is nothing related with asp.net, its just simple C# code.
cheers,
Abhijit
|
|
|
|
|
|
You should buy a basic C# book study it carefully.
Cheers!!
Brij
|
|
|
|
|
Apart from learning some C#, you should understand ASP.NET well enough to understand that this is NOT an ASP.NET question. It's a 'I really don't know C# at all and should not be working on websites until I've read a basic book and learned to use google' question. those go in the C# forum.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi!
I have a little problem. My problem is:
I have two user.
If first user Enter Own LogIn & password. It goes to another page i.e. "first.aspx".
If second user Enter Own LogIn & password. It goes to another page i.e. "second page.aspx.
My login page is common for both user.
I have use this code but it goes only one page. Actually I don't know what can I do. Please solve my problem.
protected void Button1_Click(object sender, EventArgs e)
{
string name = TextBox1.Text;
string password = TextBox2.Text;
string str = " select * from login where user_name ='"+name+"' and password ='"+password+"'";
SqlDataAdapter da= new SqlDataAdapter(str,con);
da.Fill(ds,"a");
if ((ds.Tables[0].Rows.Count) == 0)
{
Label1.Text = "User Does not Exist";
}
else
{
Response.Redirect("first.aspx");
}
thanx in advance
|
|
|
|
|
else
{
if(firstUser)
Response.Redirect("first.aspx");
else if(secondUser)
Response.Redirect("second.aspx");
}
ahmad25 wrote: string str = " select * from login where user_name ='"+name+"' and password ='"+password+"'";
Read about Sql Injection attacks and change this query to parameterized.
|
|
|
|
|
Thanx for your kind attention.
But I couldn't understand what am i write in place of
<pre>firstuser from if(firstuser).</pre>
If possible please tell me.
in my login database I stored two user. Details below :
<u>User_name</u> <u> password</u>
amit kumar
vijay anand
|
|
|
|
|
ahmad25 wrote: But I couldn't understand what am i write in place of
Why not ? Navaneeth, has completely written the code for you.
cheers,
Abhijit
|
|
|
|