|
Hi,
if you placed dropdown list inside the item templage, i think it is not possible to give the different ids for each dropdownlist.
|
|
|
|
|
Hi,
I want to know wheather a Repeator Control:
1. can accept data from the database instead of XML files?
2. can hold an image control?
If yes plz get me some sampples.
|
|
|
|
|
Subin Alex wrote: Hi,
I want to know wheather a Repeator Control:
1. can accept data from the database instead of XML files?
2. can hold an image control?
Here[^]You Go
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Hi,
"I want that my website should be viewable to 10,000 persons at the same time.
Also they might insert, or delete data from the database.
How will you do it".
This was one of the questions posed in an interview.
Apart from poolsize, what should I answer for the above question.
Regards
cmrhema
|
|
|
|
|
cmrhema wrote:
"I want that my website should be viewable to 10,000 persons at the same time.
Also they might insert, or delete data from the database.
How will you do it".
Hmm..
Did you ever check top left corner of in Codeproject Sites, that 6,006,898 members and growing! (24,514 online)
It means all online user may view the sites same times and can insert post, replying on post [ AS I am doing ], etc....
cmrhema wrote: This was one of the questions posed in an interview.
Apart from poolsize, what should I answer for the above question.
This is very common behavior of web sites, for large number of user you many need a strong backend server and all user need to maintain by session only
You can also set the maximum number of request in IIS. Create Separate Application Pool for the Site, assign that Application pool, change the Application pool Maximum Request Limit.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
hi there! I need to have a map of USA which can be clickable and depending from the state selection, to display different data. Can someone give me some example how I can do this or guide me to some address where I can see some example. Thanks
|
|
|
|
|
|
in my web app when update link is clicked at the page load it fill the textboxes with current user detail, and then these data can be changed. after changing the data when click on the update button the page refresh and load the previous data replacing new data, how can i over come this problem can i stop the page being refreshed when the button clicked
|
|
|
|
|
actually if you are filling that data on page load then you are not using page.ispostback check there... thats why your older data gets filled in texboxes you dont need to stop refresh behaviour of server side button...
its a logical problem not the control related..
Government Dyal Singh College Lahore.
|
|
|
|
|
thank you , it is the ideal solution for my problem
|
|
|
|
|
prasadbuddhika wrote: after changing the data when click on the update button the page refresh and load the previous data replacing new data,
yes, that because you are loading data on poge load. And when you click on the update button, pages load again and your old data filed the text boxes.
Your Current Scenario :
Page_Load()
{
fillTextBoxData();
}
Change it To
Page_Load()
{
if(!Page.ISPostBack)
{
fillTextBoxData();
}
}
Now, Regarding Page Refresh, You can use AJAX Updatepanel.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Hi,
We are trying to retrieve a text file stored in Oracle BLOB field. This is ASP.NET web application. The file is getting retrieved to the server but we need it on the client.. Using Response.BinaryWrite we are able to display the contents of the text file on the web page but not able to store the file to the client system. Looking for help to retrieve the file to the client.
If anybody knows the solution please send me immediately.
Waiting for your reply......
|
|
|
|
|
|
dayakar_dn wrote: please send me immediately.
Waiting for your reply......
Not very nice, demanding a response immediately. Should I stop what I am doing to sort your problem out?
If you are a web developer you should know that you cannot write to the client without user intervention - unless you write viruses.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Hi All,
we are using Visual Studio 2005 (CR 8.5) with VB.net, we are experiencing the following problems with our application:
1 - Clicking on the "Last Page" button from the toolbar on the CR viewer throws an exception: Exception Details: Error in File C:\WINDOWS\TEMP\RepDetails {E64F54CA-3902-45C9-B47E-9E152E4AC534}.rpt: Query Engine Error . All other navigation buttons (First Page, Previous, Next) work correctly.
2 - If we do run the same report file separately then it runs fine but through code it gives above problem.
If any available fixes to these issues plz provide?
Thanks and Regards
Bikash
|
|
|
|
|
how to create reports
modified on Sunday, April 12, 2009 1:52 AM
|
|
|
|
|
Hi to all,
I have stucked in a problem. I dont know where I am lacking.
Actually I have a gridview in which there is a column of a checkbox. Now I want to delete the rows for which the checkbox is selected. I have done like this.
protected void Page_Load(object sender, EventArgs e)
{
dt = (DataTable)Session["data"];
GridView1.DataSource = dt;
GridView1.DataBind();
}
protected void BtnDelete_Click(object sender, EventArgs e)
{
try
{
dt = (DataTable)Session["Cart"];
dt.PrimaryKey = new DataColumn[] { dt.Columns["REF"] };
CheckBox chkSelected = new CheckBox();
foreach (GridViewRow rowItem in GridView1.Rows)
{
chkSelected = (CheckBox)rowItem.FindControl("chkSelection");
if (chkSelected.Checked == true)
{
DataKey dk = GridView1.SelectedDataKey;
string sCellProductID = rowItem.Cells[0].Text;
DataRow dtRemoveMe = dt.Rows.Find(sCellProductID);
if (dtRemoveMe != null)
{
dt.Rows.Remove(dtRemoveMe);
dt.AcceptChanges();
}
}
}
Lblmsg.Text = "The items are successfully deleted!!";
GridView1.DataSource = dt;
GridView1.DataBind();
Session["Cart"] = dt;
}
catch(Exception ee)
{
Lblmsg.Text = ee.Message;
}
}
I dont know where I am lacking...Please help me out.
cheers
sneha[ ]
cheers,
sneha
|
|
|
|
|
Sneha,
Here a very good article from Samir, Hope this will help you.
Click Here[^]
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Hi all,
I have a web page which i don't want to disclose to the user, the response of this is a file download dialogue....
And by using web request and web response objects im calling that above web page and getting the response but my problem is im getting only the file type and the content but actually i want content.
So please help me if you know..........
thanks in advance
Lakshmi
|
|
|
|
|
blakshmi wrote: And by using web request and web response objects im calling that above web page and getting the response but my problem is im getting only the file type and the content but actually i want content.
Problem is not clear to me. can you please be little bit clear
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Here's the deal!
I'm creating two drop down lists dynamically in a GridView control and populating the second dropdownlist(let's call it ddl2 from now on) on the basis of the selection on the first dropdownlist control. The crisis is that, for multiple rows on the gridview the ddl2 starts appending values to itself and therefore ends up having repeats of the data it should originally hold.
How do I stop this repeat from happening? My code is as below.
<asp:GridView ID="grd" runat="server" OnRowDataBound="grd_RowDataBound">
<Columns>
<asp:TemplateField HeaderText="names">
<ItemTemplate>
<asp:DropDownList ID="name" runat="server" OnSelectedIndexChanged="onSelectChangeddl"></asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="age">
<ItemTemplate>
<asp:DropDownList ID="age" runat="server" AutoPostBack="true">
</asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
In c# code, i am trying to change the values of the second drop down list based on the value selected in the first. I am doing this as below:
foreach (GridViewRow row in grd.Rows)
{
DropDownList ddl1 = (DropDownList)row.FindControl("name");
DropDownList ddl = (DropDownList)row.FindControl("age");
if (ddl.SelectedValue.ToString() != "---Select---")
{
}
else
{
ddl.Items.Clear();
}
SqlCommand SPComm = new SqlCommand("someStoredProcedure", myConn);
SPComm.CommandType = CommandType.StoredProcedure;
SqlParameter param = SPComm.Parameters.Add("@something", SqlDbType.NVarChar, 50);
param.Value = something;
dr = SPComm.ExecuteReader();
int i = 0;
while (dr.Read())
{
ddl.Items.Insert(i, dr.GetString(0));
}
dr.Close();
ddl.Items.Insert(0, "---Select---");
}
In the above code, all the values in the second drop down list are getting duplicated based on the selected index changed event handler of the first drop down list.
Can anyone help me with this? Been trying all kinds of stuff with this since three weeks now! H-e-L-p!
scarface
|
|
|
|
|
hi,
In my website when m displaying my data in a datalist. the list is so long that it is overlapping with my footer. how can i increase the size of my content page, so that the footer always comes at the bottom of the page where the content page ends.
|
|
|
|
|
maheshsahini wrote: ow can i increase the size of my content page, so that the footer always comes at the bottom of the page where the content page ends.
I will suggest, use fix size DIV and place all other content inside the DIV.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
following is the code:
Dim constr As String
constr = "Data Source=YOGESH\SQLEXPRESS;Initial Catalog=projdb;Integrated Security=True"
Dim conn As New SqlConnection(constr)
Dim cmd As New SqlCommand(constr, conn)
Dim rd As SqlDataReader
cmd.CommandText = "select * from employee where emp_name='txtname.text'"
conn.Open()
Try
rd = cmd.ExecuteReader()
GridView1.DataSource = rd
GridView1.DataBind()
Catch ex As Exception
MsgBox("exception occured:", MsgBoxStyle.Critical)
MsgBox.show(ex.Message, MsgBoxStyle.Critical)
End Try
basicallly iam tryin to fetch the details of the employee whose name is entered in the textbox of the form, from the database and display the same in a gridview
so after entering the name when i click the submit button an exception stating"exception occured" is gettin displayed..
plzzzzz suggest the changes..
|
|
|
|
|
yorockk wrote: Dim rd As SqlDataReader
cmd.CommandText = "select * from employee where emp_name='txtname.text'"
conn.Open()
Try
rd = cmd.ExecuteReader()
GridView1.DataSource = rd
GridView1.DataBind()
Problem is here. Use Data Set as a source of GridView,which will be very easy for your to display.
Try something like this
SqlDataAdapter da = new SqlDataAdapter(commandText, ConnectionString);
DataSet ds = new DataSet();
da.Fill(ds)
GridView1.DataSource=ds;
Note : This is C# syntax
cheers,
Abhijit
CodeProject MVP
|
|
|
|