|
|
Thanks for your support i search free provider but i didn't get any free provider if you know any free web hosting provider please let me know
|
|
|
|
|
I have listbox control on a web user control
now in my aspx page i want to fill the listbox on server side
One person's data is another person's program.
--J.Walia
|
|
|
|
|
Expose the Properties of the Listbox in your usercontrol and assign them in the hosting page.
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
how to add classes and functions in a website
|
|
|
|
|
Rajni_pooni wrote: how to add classes and functions in a website
So, Your are very new in Programming world. I will suggest you to Buy some basic programming book and start reading.
If stuck, then ask here.
|
|
|
|
|
hii....
i m reading a table through datareader.it reads a single row but next time it comes out of loop even when there
is a row in table.
the code is..
SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["Jajaipur"].ConnectionString);
SqlDataReader dr = null;
//SqlDataReader dr2 = null;
string str = "SELECT MenuId, Menu FROM Menu ";
SqlCommand cmd = new SqlCommand(str, conn);
conn.Open();
dr = cmd.ExecuteReader();
Response.Write("");
while (dr.HasRows != null)
{
dr.Read();
String id = dr["MenuId"].ToString();
String str1 = dr["Menu"].ToString();
int i = Convert.ToInt32(id);
Response.Write("- ");
Response.Write(str1);
TextBox1.Text = TextBox1.Text+ str1;
conn.Close();
string str2 = "SELECT MenuId, SubMenuID, SubMenu FROM SubMenu where (MenuId = " + i + ")";
SqlCommand cmd2 = new SqlCommand(str2, conn);
//SqlDataReader dr2 = null;
conn.Open();
dr = cmd2.ExecuteReader();
Response.Write("");
while (dr.Read())
{
String str3 = dr["SubMenu"].ToString();
Response.Write("- ");
Response.Write(str3);
Response.Write(" ");
}
Response.Write(" ");
Response.Write(" ");
}
Response.Write(" ");
conn.Close();
|
|
|
|
|
KhandelwalA wrote: while (dr.HasRows != null)
{
dr.Read();
Try this
While(dr.Read())
{
}
|
|
|
|
|
Hello every one.............i m developing a shopping cart website. and i am creating ajax tab container to show product specifications, comparisons,etc with multiple tab index. Is it possible to show specific Active tab index when user redirects to this page from another page like if user clicks on Specification, then it should be active and for Comparisons show comparisons tab etc..........plz guide me.
|
|
|
|
|
You need to send ActiveTabIndex Property
ActiveTabIndex=TabId
Hope this will help you
|
|
|
|
|
Dear All,
In my web application, I have a IFRAME in a web page.
When the user previews a document it is loaded in the IFRAME.
When the user places the cusrsor outside the IFRAME in the page and presses "ESC" key, it closes the IFRAME.
Can any one tell me how to get rid of this issue.
Thanks a lot in advance
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
M. J. Jaya Chitra wrote: When the user places the cusrsor outside the IFRAME in the page and presses "ESC" key, it closes the IFRAME.
You are using any div for place the IFrame? Can you please show us the code?
|
|
|
|
|
Dear Jana,
Yes it is inside the div tag only below is the code for the same:
<div id="divPDF" runat="server" visible="false">
<iframe id="PDFframe" runat="server" style="height: 410px; width: 100%; overflow: auto;"
frameborder="0" scrolling="auto"></iframe>
</div>
The code behind is:
divFilter.Visible = false;
divPDF.Visible = true;
lnkBackToFilters.Visible = true;
PDFframe.Attributes["src"] = "ReportPDF.aspx";
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Hi guys i have a doubt in file directory...,
i am getting all the files which is in a partcular folder and binding in to my dropdown listbox...,
for this i wrote this code:
FileInfo fi = new FileInfo(Server.MapPath("../admin/Templates/Markets/"));
DirectoryInfo di = fi.Directory;
FileSystemInfo[] fsi = di.GetFiles();
ddlpagename.DataSource = fsi;
ddlpagename.DataBind();
Now my question is:
my folder contained all kind of file types...,
in that i wnt to bind only .htm/.html files only...,
how to get a particular file type in a particular directory and bind in to dropdown list?
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
One Sample Example for you
using System;
using System.IO;
class Program
{
static void Main()
{
string filePath = @"C:\Users\Abhijit\Test.html";
string exten = Path.GetExtension(filePath );
if (exten == ".html")
{
}
}
}
Hope this will help you to move ahead
|
|
|
|
|
Hi abhijit thanks for ur reply,
but i amn't using a particular file...,
its collections of files need to bind in dropdownlist...,
is there anyother wau to achieve it?
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
Member 3879881 wrote: but i amn't using a particular file...,
its collections of files need to bind in dropdownlist...,
Yeah that I know. I have gave you the idea how to implement it. As there is a single file, you can do the same for File Collection also in a for-each.
|
|
|
|
|
try this
private static void RemoveDuplicateItems(DropDownList ddl)
{
for (int i = 0; i < ddl.Items.Count; i++)
{
ddl.SelectedIndex = i;
string str = ddl.SelectedItem.ToString();
for (int counter = i + 1; counter < ddl.Items.Count; counter++)
{
ddl.SelectedIndex = counter;
string compareStr = ddl.SelectedItem.ToString();
if (str == compareStr)
{
ddl.Items.RemoveAt(counter);
counter = counter - 1;
}
}
}
}
and bind it like this
private void Bind_Restore_Combo()
{
DirectoryInfo dir = new DirectoryInfo(@"C:\DATABASES\");
FileInfo[] files = dir.GetFiles();
foreach (FileInfo file in files)
{
if (file.Extension == ".htm" && file.Extension != ".html")
{
cmbrestore.Items.Add(Convert.ToString(file.Name));
RemoveDuplicateItems(cmbrestore);
}
}
}
This will help
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
|
I guess, this is the problem due to binding the data on girdview during Postback. You have binded the data at Page_Load and you didn't check the IsPostBack Property.
|
|
|
|
|
Yeah i have written bindgrid inside(!IsPostback)
|
|
|
|
|
I have a gridView on my page. How do I insert the contents of the gridView to sql database? My database table is empty at the moment.
|
|
|
|
|
check this
http://www.dotnetfunda.com/articles/article71.aspx[^]
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Loop all cells foreach row,when looping ends then save data in database.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
There are various way to do it. Its depends what is your current DataSource Type.
|
|
|
|