|
am working in online application asp.net with c#..
i have to create dynamic pages...
that means i have to update day to day events...
how can i do this...
send me suggestions...
thanks in advance...
|
|
|
|
|
Follow these instruction. It may help you.
(1) Use database to save contents.
(2) Create admin panel to add/update contents.
(3) Create dynamic link from database for menu/user prospects.
Go ahead... It is very easy...
The miracle is this--the more we share, the more we have.
|
|
|
|
|
thx for ur rply it is usefull to me...
i follow that...
can u provide sample links..
|
|
|
|
|
|
i am searching...
but i could not find any use full link to my work yet...
|
|
|
|
|
Hello frnds,
I have a problem...
In my project we have to enter the user's credentials.eg.
Name
Father's name
Mother's name
After taking the credentials we have button "print".Whenever the user presses the button , A preview will be shown first.
And the preview will be on the word document.The word document is in the fixed format.eg.
Name
_____________
Father;s Name
______________
Mother's Name
_________________
So my problem is I am able to have....
Name
Father's Name
Mother's Name
and the desired o/p is
Name
_____________
Father;s Name
______________
Mother's Name
_________________
I am unable to read the line separation in the word document..
Please give me some guidance to do this....
cheers,
sneha
|
|
|
|
|
Hi i have public void method in my back end code part...,
In that i am getting some datas and binding into a table...,
Now my question is, i called the method on my aspx page itself, like this...,
<table border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td id="E" align="center">
<%loadWatchlist(this, null);%>
</td>
</tr>
</table>
i know,can i call the method on my page load also,like this?,
If(!isPostBack)
{
loadWatchlist();
}
whats the difference between the two ways of call...,
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
Good Question...
In my view, there is no difference between them except 1st one is conventional ASP Style and next one is new .NET style.
The miracle is this--the more we share, the more we have.
|
|
|
|
|
Hi sir,
I want to embed flash player in asp.net web page and what tag are used.
sourabh
|
|
|
|
|
i think it's nothing diffirent to do it in normal html.
|
|
|
|
|
hello how can retrieve data in database
i want fill all the check box selected from database
use JavaScript asp.net
|
|
|
|
|
|
What you actually mean by checkbox,How you can store data in checkbox from database ,for what,do one thing, if you are using windows operating system(atleast u must aware of that) ,after switched on the computer wait for some time ,notice,something is happening there but dont do anything.Atlast u will get a screen that wont change.Stare at the left bottom side of the screen ,U can see a start ,Just press there with ur mouse cursor,u will then get some lists and u will see a picture of e and the name will be Internet Explorer.Click there ,one window will come type the url(u are able to reach at code project ,so i am guessing that u can do that)type www.google.com ,inside that type checkboxes and do search.If the google page is not comming and saying that This page cannot be displayed ,that means we are lucky(except u) or ur internet connection is lost.
|
|
|
|
|
JAS GIRI wrote: use JavaScript asp.net
Wow. Another day, and all you've done is find a new way to ask the same questions. Javascript can't see your database, why would you use it to fill checkboxes from your database ? You don't know, do you ? You stopped playing WoW today and in the toilet you found a magazine left there by real programmers, so you turned a few pages and learned a new buzzword. Sorry, you got it wrong. And, another day has gone by and you've still not done any work. How long before your boss notices ?
I see you posted some code in a seperate post. How about you post the bit of code that you wrote to do the bit you're trying to do, and explain what you've tried to make it work, what you're seeing in the debugger, and where you are confused. All the stuff that we'd see if we got asked a question from a programmer.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
SqlConnection cn = new SqlConnection(@"");
string []Sel=new string[3];
int Cnt;
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
SqlCommand cmd = new SqlCommand("Select * from color", cn);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds, "color");
string d;
for (int i = 0; i <= ds.Tables[0].Rows.Count - 1; i++)
{
for (int j = 1; j <= ds.Tables[0].Columns.Count-1; j++)
{
d = ds.Tables[0].Rows[i].ItemArray[j].ToString();
Sel = d.Split(new Char[] { ',' });
Cnt = Sel.Length;
switch (j)
{
case 1:
{
multchk(chk1, chk2, chk3, Sel);
break;
}
case 2:
{
multchk(chk4, chk5, chk6, Sel);
break;
}
}
}
}
}
protected void multchk(CheckBox ch1,CheckBox ch2,CheckBox ch3,string []str)
{
if (Cnt==1)
{
if (str[0] == "1")
ch1.Checked = true;
if (str[0] == "2")
ch2.Checked=true;
if (str[0] == "3")
ch3.Checked = true;
}
if (Cnt==2)
{
if (str[0] == "1" || str[1] == "1")
ch1.Checked = true;
if (str[0] == "2" || str[1] == "2")
ch2.Checked = true;
if (str[0] == "3" || str[1] == "3")
ch3.Checked = true;
}
if (Cnt==3)
{
if (str[0] == "1" || str[1] == "1" || str[2] == "1")
ch1.Checked = true;
if (str[0] == "1" || str[1] == "2" || str[2] == "3")
ch2.Checked = true;
if (str[0] == "1" || str[1] == "2" || str[2] == "3")
ch3.Checked = true;
}
}
protected void singchk(CheckBox ch1,CheckBox ch2,string []str)
{
if (str[0] == "1")
ch1.Checked = true;
if (str[1] == "2")
ch2.Checked = true;
}
|
|
|
|
|
This is the worst code I've seen in a long time. SO many things wrong with it. If someone I paid wrote this, I'd fire them. In fact, there's no way I'd have hired them.
Your checkboxes are called chk1, chk2, chk3, chk4, chk5, and chk6 ? Are you hoping for future outsourcing work on the basis that your code is unreadable ?
JAS GIRI wrote: string d;
for (int i = 0; i <= ds.Tables[0].Rows.Count - 1; i++)
{
for (int j = 1; j <= ds.Tables[0].Columns.Count-1; j++)
{
d = ds.Tables[0].Rows[i].ItemArray[j].ToString();
You create d outside the loop but only use it inside. you use <= x-1 instead of < x, you start j from 1 instead of 0 ( is that right ), you use i and j instead of meaningful names, what a mess.
JAS GIRI wrote: protected void multchk(CheckBox ch1,CheckBox ch2,CheckBox ch3,string []str)
{
if (Cnt==1)
{
if (str[0] == "1")
ch1.Checked = true;
if (str[0] == "2")
ch2.Checked=true;
if (str[0] == "3")
ch3.Checked = true;
}
if (Cnt==2)
{
if (str[0] == "1" || str[1] == "1")
ch1.Checked = true;
if (str[0] == "2" || str[1] == "2")
ch2.Checked = true;
if (str[0] == "3" || str[1] == "3")
ch3.Checked = true;
}
if (Cnt==3)
{
if (str[0] == "1" || str[1] == "1" || str[2] == "1")
ch1.Checked = true;
if (str[0] == "1" || str[1] == "2" || str[2] == "3")
ch2.Checked = true;
if (str[0] == "1" || str[1] == "2" || str[2] == "3")
ch3.Checked = true;
}
}
The logic surrounding Cnt is poorly implemented. Again, it's like you're trying to write spaghetti code.
Perhaps if you in one place posted your crappy code, some notes as to what you're trying to do, an explanation of the data you're using, why you can't use a checkboxlist, and what exactly this code does, as opposed to what you expect it to do, perhaps then someone who feels like doing your job for you, might have what they need in order to help. If you fail to do this in the next day, then I'd suggest you're beyond any sort of help, and should just give up.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Is there MS SQL database server in visual studio 2008? or we have to setup it separately?
|
|
|
|
|
I am not sure, but I think express version will be installed with VS. BTW, how this question is in ASP.NET forum?
|
|
|
|
|
Hi
When i tried to debug my web application the above is coming
|
|
|
|
|
I don't see how you expect anyone to be able to help you based on this. Tell us exactly what is happening, what you've tried to fix it, what your setup is, etc.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi,
I have a Dictionary<string,> object that uses the Item name as the Key (string) and Size as the Item (decimal). However, on some occasions, the Item name repeats itself, but the itemIDs are always unique. So, I want to switch my Dictionary<string,> to be Dictionary<int,decimal>. My problem occurs when I am trying to get items that are checked from the datagrid. Right now this is the code:
public void GetChecked()
{
Dictionary<string,decimal> Checked=(Dictionary<string,decimal> )Session["CheckedItems"];
string itemname;
CheckBox cb;
TextBox tb;
if (Checked !=null)
{
foreach (GridViewRow gvRow in gvwItems.Rows)
{
itemname= gvRow.DataKeys[row.RowIndex].Value.ToString();
if(Checked.ContainsKey(itemname))
.
.
.
.
How do I alter this code to read the item_id which is an integer and not a string?
Please help if you can, I am very stuck on this and do not know how to proceed.
Thank you.
|
|
|
|
|
Dictionary<int,decimal> Checked=(Dictionary<int,decimal> )Session["CheckedItems"];
int itemname;
CheckBox cb;
TextBox tb;
if (Checked !=null)
{
foreach (GridViewRow gvRow in gvwItems.Rows)
{
itemname= Convert.ToInt32(eRow.DataKeys[row.RowIndex].Value.ToString());
if(Checked.ContainsKey(itemname))
...
...
...
|
|
|
|
|
I made the changes you suggested and am now getting the following error:
A first chance exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll
An exception of type 'System.Threading.ThreadAbortException occurred in mscorlib.dll but was not handled in user code
A first chance exception of type 'System.FormatException' occurred in mscorlib.dll
How do i fix this?
|
|
|
|
|
Does it tell you at which line the exception occurred?
|
|
|
|
|
how to use session method in an application
|
|
|
|
|