|
minhpc_bk wrote: And you can do in the common way that many other sites do
Yes I was thinking to do the same thing. But I was wondering how they do it?
Is there any sample link?
thanks in advance. Much appreciated.
|
|
|
|
|
blurMember wrote: But I was wondering how they do it?
Is there any sample link?
It's not difficult, you can get started with the Starter kits[^]
|
|
|
|
|
Hey Thanks!!!!
It will be used in the next years to come.
thanks in advance. Much appreciated.
|
|
|
|
|
Hi,
I am using CDOSYS to send mail through ASPNET. When I run this script on my server, it is taking more time to deliver to the yahoo mail addresses whereas the same message takes fractions of seconds to reach some other mail ID's.
I guess the mail might be going through yahoo spam filters. How can I make my mail message trusted to the yahoo/gmail community?
Thanks
-Sudhakar
|
|
|
|
|
Hey, I'm using a CheckBoxList, and I'm trying to add CheckBoxs dynamiclly.
Now, I can do it with the Items property, but I can't check them if they are checked or not (in the postback).
Well... either I can do it through the Controls property, or either you can help me.
Thanks. NaNg.
|
|
|
|
|
If you are dynamically adding checkboxes, make sure you dynamically add them on postback too.
|
|
|
|
|
nevermind i got it.
just used the Selected property.
|
|
|
|
|
try it
this.CheckBoxList1.Items[0].Value;
|
|
|
|
|
try it
this.CheckBoxList1.Items[0].Value;
|
|
|
|
|
I want to know how to create the equivalent of a messagebox(VB2005) in ASP.net using VB2005 as the programming language?
Thank you
Nothing lasts but nothing is lost
|
|
|
|
|
ClientScript.RegisterStartupScript(Me.GetType, "AKey", " alert('YourMessage'); ")
-- modified at 13:46 Tuesday 22nd August, 2006
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
|
|
|
|
|
In the Button Click Event, Type in :
Page.RegisterStartupScript("Alert", "alert(""Button is clicked"");");)
Thanks & regards,
Suresh Dayma
|
|
|
|
|
I am trying to get the Page_load event to dynamically update my checkboxlist values to correspond with the columns in my grid view. the code I have is as follows:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Dim listItemCount As Integer = -1
Dim totalColNum As Integer = GridView1.Columns.Count
If Page.IsPostBack Then
''Do Something
Else
While listItemCount <= totalColNum
listItemCount += 1
CheckBoxList2.Items.Add(GridView1.Columns(listItemCount).ToString)
End While
End If
End Sub
But I am getting this error:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Any ideas??
|
|
|
|
|
You're initilializing listItemCount to -1, which means your While loop will execute at least once, even if the value returned by GridView1.Columns.Count is zero.
If the gridview column count is in fact zero, you'll get the "index was out of range" error on the line:
CheckBoxList2.Items.Add(GridView1.Columns(listItemCount).ToString) . If there are no Columns, then referencing Columns(0) gives you your error.
This could easily happen if you have AutoGenerateColumns set to true on your gridview. The Columns collection only contains those columns that are specifically declared (or created in code). The collection does not include those columns that are auto-generated.
Clear as mud?
|
|
|
|
|
I kind of got that to work but now I want to use those fields to remove and add columns to the gridview. If I hard code the checkboxlist it works fine but this way is more difficult see the button click event below:
Protected Sub btnUpdate_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim li As ListItem
Dim liNum As Integer = -1
Dim colNum As Integer = -1
For Each li In CheckBoxList2.Items
liNum += 1
colNum += 1
Select Case li.Value
Case liNum
If li.Selected Then
GridView1.Columns(colNum).Visible = False
Else : GridView1.Columns(colNum).Visible = True
End If
End Select
Next
End Sub
This is the code for creating the checkboxlist:>
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Dim listItemCount As Integer = -1
Dim totalColNum As Integer = GridView1.Columns.Count
Dim valNum As Integer = -1
totalColNum = totalColNum - 5
If Not Page.IsPostBack Then
While listItemCount <= totalColNum
listItemCount += 1
valNum += 1
CheckBoxList2.Items.Add(GridView1.Columns(listItemCount).ToString)
CheckBoxList2.Items.Item(listItemCount).Value = valNum.ToString
End While
End If
End Sub
I tried to update the value of the created items using:
CheckBoxList2.Items.Item(listItemCount).Value = valNum.ToString
But it does not seem to work.
|
|
|
|
|
dear guys,
i have two ASPX pages, "FORM_A" and "FORM_B"
In FORM_A, i have one command Button, When the button is Clicked,
i'm Opening the FORM_B,
FORM_B Has TWO TEXTBOXES[for collecting the User inputs], OK AND CANCEL BUTTON
when the user clicks the OK Button in FORM_B after entering the Inputs in Textboxes,
i want to refresh or reload the "FORM_A" by coding [client side script and server side script]
could any one give solution for this
Thank u,
Sansadhan
|
|
|
|
|
|
Thanks Mr.Mike, it's very helpful for me.
Now Again One more question
There is two forms , "FORM_A" and "FORM_B"
In FORM_A i'm Having one Report and a button control
when user clicks the button the i'm showing the FORM_B
and collecting the Data in FORM_B
when the user Close the FORM_B
what i have to do is
i want to show the collected data in report. Report is created at server side
i want to send the data to server and recreate the report and bind the report to the "FORM_A".
How to do this
Kindly Provide me solution
|
|
|
|
|
Why not have it on one form? Have a Panel with an id of something like panelCriteria and a second Panel on the page panelReport. When users click your "criteria" button, have your event handler hide panelReport and display panelCriteria. Then, when the users click "OK" or "Display Report" (or whatever you'd title that button), have the event handler hide the panelCriteria and display panelReport. Because it's all on one page then, the report will have all the criteria control values available to it.
|
|
|
|
|
Hi
How to pass values between two pages with out using Querying string and session in ASp.net.
|
|
|
|
|
|
Hi,
you can use cookies or you can java script to post the values to another page, on that page you can read the values.
Ram
|
|
|
|
|
1. Until now I'm setting the Control page like this:
<%@ Register TagPrefix="Menu" TagName="Bottom" Src="Bottom.ascx" %>
On the top of the page.
But now I need to set the Src dynamicly.
eg.: <%@ Register TagPrefix="Menu" TagName="Bottom" Src="Session["ID"] + "/Bottom.ascx" %>
Something like this.
Now I know that this is not how to do it, but maybe you can help me?
2. I now need to create buttons dynamiclly, according to a database.
Well, creating them is the easy part.
But when I postback they just disapear... someone know why? and how can I fix this?
thanks alot! NaNg
|
|
|
|
|
1. Use the LoadControl to load the control dynamically in code behind:
Control menu = Page.LoadControl(Session["ID"] + "/Bottom.ascx");
Then add the control to the page.
2. You have to create the buttons every time the page is created, not just the first time.
---
b { font-weight: normal; }
|
|
|
|
|
Guffa's suggestions are terrific here. Just to add some perspective to your second question: keep in mind that the web is a stateless environment. Each postback to an .aspx page is in reality a separate request of the web server, so the server needs to construct a complete page in response each time.
When you declare controls, using syntax like <asp:Button runat="server".../> , you leave it up to the page parser to create the necessary Button object. And the page parser does just that, on each request, regardless of whether it was a first time request or a postback.
When you instantiate your own controls in code (like creating a Button), you're effectively taking on the responsibility that the page parser normally has under declarative circumstances. And like the page parser, it is up to you to recreate those controls on each request, regardless of whether or not the request is a postback.
|
|
|
|