|
How to bind RadioButtonList in a formview in insert mode.
Best Regards,
Trishul Tandel
Software Developer
|
|
|
|
|
I have a gridview,in that i have one column inside which another grid view.
I dont have any problem with this gridview having a single column.
But how can i bind the same dataset with two columns containing daatagrid.
Can anybody please help me?
VanithaVasu
|
|
|
|
|
Hi all,
I am using C# , asp.net2.0 , ajax1.0 and sql server 2005.
I am facing problem of slowness of web
http://www.bbraunconnect.co.in/HRMS/DailyCallReport/DCR.aspx
please click on the link ,this link will ask username and password . username is em194 and password is TEST123@
let me explain the problem. you will find subdivision .On its selection product dropdownlist is filled but it is consuming some time on main server(where database and code are not on the same machine ) whereas in test server (where database and code are on the same machine ) it does not consume any time I would like to know how to I speed up the process.
let me explain how I am filling the control
I made one class and defined method as shown below (earlier I tried by making datatable and filling in table but it was taking higher timespan then this )
<code>
public void FillctrlList2(DropDownList ctrl, string procedurename,string fieldtext ,string fieldvalue , string conn, SqlCommand cmd, int i)
{
try
{
if (con == null)
{
this.openconnection(conn);
this.con.Open(); // con.Open();
}
if (con.State == ConnectionState.Closed)
{
this.openconnection(conn);
con.Open();
}
ctrl.Items.Clear();
ctrl.Items.Add(new ListItem("Select One", "0"));
cmd.Connection = con;
cmd.CommandText = procedurename;
cmd.CommandType = CommandType.StoredProcedure;
rdr = cmd.ExecuteReader();
ctrl.DataSource = rdr;
ctrl.DataTextField = fieldtext;
ctrl.DataValueField = fieldvalue;
ctrl.DataBind();
}
catch (Exception ex)
{
throw ex;
}
finally
{
if (rdr != null)
{
rdr.Close();
}
if (con != null)
{
con.Close();
}
}
}
I have web config connection as
&lt;add name="bbraunemisconnectstring" connectionString="Data Source=bindh2,1433;Initial Catalog=bbraun_emis;User ID=sa;Password=LITTLEANGEL" providerName="System.Data.SqlClient"/&gt;
</code>
data is also not much in the table it 500 to 600 and also i am using ajax updatepanel too.
The procedure I am using to fetch the data is
<code>
ALTER PROCEDURE [dbo].[SPGETPRODUCT_GIVENSUB]
(
@SUBCODE VARCHAR(50)
)
AS
SELECT PM_PRD_CODE , PM_PRD_NAME FROM PROD_MASTER WHERE PM_PRD_GR_CODE = @SUBCODE
</code>
please suggest something to decrease time span
regards
imran khan
|
|
|
|
|
500-600 records is still quite a lot of data to display in one go. Do your users actually need to see this many records at one time? The amount of HTML required to render out all these items will increase your page size and therefore its download time. Consider fetching items asynchronously, so the dropdownlist loads in the background but the user can still use the page.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Following is the example that shows the utility of delegates .
Am i doing right?
or there is further need of code improvement ?
using System;<br />
using System.Collections.Generic;<br />
using System.ComponentModel;<br />
using System.Data;<br />
using System.Drawing;<br />
using System.Text;<br />
using System.Windows.Forms;<br />
<br />
namespace w<br />
{<br />
public partial class Form1 : Form<br />
{<br />
public Form1()<br />
{<br />
InitializeComponent();<br />
}<br />
<br />
private void Form1_Load(object sender, EventArgs e)<br />
{<br />
d ddd = new d();<br />
ddd.sd(0); <br />
}<br />
}<br />
<br />
}<br />
<br />
namespace w<br />
{<br />
public delegate void smartdelegate(int i);<br />
public class d<br />
{<br />
public smartdelegate sd;<br />
public d()<br />
{<br />
sd = new smartdelegate(aa);<br />
}<br />
private void aa(int i)<br />
{<br />
System.Windows.Forms.MessageBox.Show(i.ToString());<br />
}<br />
}<br />
}
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
Pankaj Garg wrote: If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
Your signature is good and optimistic. Perhaps in a way it also stands a good illustration of a saying "A candle that lights another and in the process there is an enhanced brightness in the area."
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
hi iam working in school website and i need to dir schedule so i create table but i want to merge cells in this table at run time to add controls at merged cells in my table server control
how??????????????????????????
md_refay
modified on Saturday, March 15, 2008 3:30 AM
|
|
|
|
|
which table cell are you talking is it cell in web page or cell in Excel .
Can you please confirm ?
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
Dear Friends,
I have created one web application in a windows XP plateform with .NET 2003. Now when I deployed the application on a widows 2003 application server it is logged in successfully and then it gives me error as 'Access is Denied'
Your quick response would be highly appriciated
Regards
Murtuza Patel
|
|
|
|
|
Is this error Related with IIS Server or your application ?
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
Hello all
In my application i am creating a word document based in user
responses. Now i want to send the document as an attachment with the
mail as soon as the document is created. I want to send email in
background. As soon as document is created i want to send mail
containing document as an attachment.(without using any control)
How can i do this? Please help me to solve..
I am creating document by two ways.
1) StringBuilder class.
2) Exporting datagrid to document.
Thanks
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
MailMessage mail = new MailMessage();<br />
mail.From = txtFrom.Text;<br />
mail.To = txtTo.Text;<br />
mail.Subject = txtSubject.Text;<br />
mail.Body = txtMsg.Text;<br />
mail.BodyFormat = MailFormat.Html;<br />
mail.Attachments.Add(new MailAttachment(AttacchmentFile));
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
I am creating a word doc using string builder class.
As you mentioned if i write Response.write(strHetmlContent) for
attaching a attachment then it shows a error output can not
produce a value?
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
hi rahuls can you put the line of code where you creating the word file ?
Thanks !!!
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
Hi
Here is that code.
code deleted
When it come to statement Response.Write(strHTMLContent) then a word
document will be generated and in my sendmail function i want to send
this document in the mail as an attachment.
Thanks.
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
modified on Saturday, March 15, 2008 3:30 AM
|
|
|
|
|
if you write Respose.Write(strHTMLContent) then where the content is going to be store.
better trying to save file temporty and add the file as attachment and delete after sending the mail.
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
Content will not be going to store somewhere.
as soon as Respose.Write(strHTMLContent) this code is called
document is generated and it asked to save it on haraddrive.
(like when we are downloading any s/w from net)
Thanks
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
Hi
This is another code. in that i am displaying all data in grid
and exporting this data to word doc file.
Sub CreateDoc()<br />
Try<br />
<br />
Dim oStringWriter As New System.IO.StringWriter<br />
Dim strFileName As String = "ResultGrid.doc"<br />
Response.Clear()<br />
Response.Buffer = True<br />
'Response.ContentType = "application/vnd.ms-word"<br />
Response.ContentType = "application/vnd.ms-word"<br />
Response.AddHeader("Content-Disposition", "attachment; filename=""" & strFileName & """")<br />
Response.ContentEncoding = System.Text.Encoding.UTF7<br />
Response.Charset = ""<br />
EnableViewState = False<br />
<br />
Dim oHTMLTextWriter As New System.Web.UI.HtmlTextWriter(oStringWriter)<br />
<br />
DataGrid1.RenderControl(oHTMLTextWriter)<br />
Response.Write(oStringWriter.ToString())<br />
Response.End()<br />
Catch ex As Exception<br />
Response.Write(ex.Message)<br />
End Try<br />
End Sub
Thanks
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
i am looking on it... if possible delete the last code !!!!
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
Ok
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
yup .... now it looks Good !!!
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
Yes
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
I have a list box with some item and Autopost back is true. when i select any one of item first item of list is automaticaly selected. how i can resolve this problem !!
Any idea !
Thanks in Advance !!!
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
Hi
Are you binding dropdownlist data from database if yes then put
you code which you are using for binding in
<br />
if not page.ispostback<br />
'put u r code here<br />
end if<br />
this is happen because whenever you select item in dropdownlist page get refreshed and again dropdownlist is binded from db.
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
thanks for reply.
Rahul, if possible recheck the formating of code that where you post your code for word file creation . its totaly destroying the strcuture !!!!
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|