|
Yes Navaneeth this will work for some situation, in my case i am using a third party tool for text editing. user can enter any text on that tool(supports formatting through it's own options on tool) and click on on save button, then i need to save the content in database, those content will be like having color , fond, and some other properties for faormatting the text(including text too).
this tool has one prorerty named as "content", i can only access user entered text with this property "content", which always holds string of all above proerties(like font etc with user entered text) which i just reffered.
when i will take this string and save to database it will saved as it is(proerties + text). when i open a word document and assign this string(which i will retirieve from database in a string) to a paragraph and will write to word, it will take whole string and write it as it is like if html content was <b>"People"</b> it will write <b>People often</b> into the word, not like just making "People" as bold(i mean it will ignore all html tags and consider those as normal set of characters only and will write tags too).
so i think it is something different from the condition for which this suggestion might have work for you.
if i am wrong please let me know...
People often say that motivation doesn't last. Well, neither does bathing - that's why we recommend it daily
Akhilesh Singh
-- modified at 8:17 Tuesday 11th September, 2007
|
|
|
|
|
How can we authenticate users in http handlers. I mean only allow users who are authenticated to use the http handlers ???
ppl that are in a certain page.
Is there anyway to see on server side wether a user calling the XmlRequest.open(...);XmlRequest.send(); method is on the page we want .??
|
|
|
|
|
How do u use IIS to publish a site in my network i'm totaly stuck
can anyone help me
|
|
|
|
|
i want to help you but for that regards plz explain your problem properly, because to publish a site there is no use for IIS. Tell me what excatly you want to do.
regards
Yogesh
|
|
|
|
|
|
Hi
I have 3 listboxes on my webpage,The first one which is ListBox2,when that page loads it display all the project members,It does that.
That second and third ones when the user clicks the button it should display all the selected members in second listbox (ListBox1) and their Email address in the third listBox (ListBox3).
This is my Code for the button click ,when the page loads it display all the project members but,when I chick the button ,it only display the selected members in the second Listbox(ListBox1)and doesn't display their email address in the third ListBix(ListBox3)
**I WANT IT TO DISPLAY ALSO THE EMAIL ADDRESS IN THE THIRD LISTBOX,PLEASE HELP ME
Protected Sub bntAdd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles bntAdd.Click
If ListBox2.SelectedIndex >= 0 Then
Dim i As Integer
For i = 0 To ListBox2.Items.Count - 1
If ListBox2.Items(i).Selected Then
If Not lasset.Contains(ListBox2.Items(i)) Then
lasset.Add(ListBox2.Items(i))
End If
End If
Next i
For i = 0 To lasset.Count - 1
If Not ListBox1.Items.Contains(CType(lasset(i), ListItem)) Then
ListBox1.Items.Add(CType(lasset(i), ListItem))
End If
ListBox2.Items.Remove(CType(lasset(i), ListItem))
Next i
Else 'ListBox2.SelectedIndex >= 0 Then
Dim UserAdmin_Id As Integer
Dim ds As New Data.DataSet
Dim objdata As Businesslayer.TimeSheet = New Businesslayer.TimeSheet
ds = objdata.GetMemberEmail(UserAdmin_Id)
Dim Email As Integer
For Email = 0 To ListBox2.Items.Count - 1
If ListBox2.Items(Email).Selected Then
If Not lasset.Contains(ListBox2.Items(Email)) Then
lasset.Add(ListBox2.Items(Email))
End If
End If
Next Email
For Email = 0 To lasset.Count - 1
If Not ListBox3.Items.Contains(CType(lasset(Email), ListItem)) Then
ListBox3.Items.Add(CType(lasset(Email), ListItem))
End If
ListBox1.Items.Remove(CType(lasset(Email), ListItem))
Next Email
End If
End Sub
|
|
|
|
|
when i press back button in IE the previous web page dosn't reload, it shows the old data
how can i make the page reload when i press the back button on IE??
-- modified at 4:50 Tuesday 11th September, 2007
|
|
|
|
|
What you want to do ? means how your appliction should behave wheh user click back button of IF
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
thanx i solved the problem
thank you for help
|
|
|
|
|
Hi
How should we use ajax and prevent abuse . Http handlers can be called by anyone. What is the way to use ajax and just limit usage to only that page. in the code below:
xmlHttpObj.open('GET','http://' + location.host +<br />
myserver.ashx', true);
anyone who see the source code can recover the serving page
|
|
|
|
|
I add certain controls to table than i add the table to panel every time user preses add conrtrol than i write some text in the controls added and press submit but when i try to acess the table from the panel. the panel has no table
|
|
|
|
|
u must override OnInit Event and place codes in this section
or send me, your codes for check it and reply to u.
We Can Do Anything, If We Want It
|
|
|
|
|
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page
{
//System.Collections.ArrayList ar = new System.Collections.ArrayList();
Table table = new Table();
Table outtable = new Table();
//Table table;
// Table outtable;
protected void Page_Load(object sender, EventArgs e)
{
//if ((Session["isaddclicked"] != null) && ((bool)Session["isaddclicked"]))
//{
// if (Session["controlsArray"] != null)
//{
// // ar = (System.Collections.ArrayList)Session["controlsArray"];
// table = (Table)Session["controlsArray"];
// }
//pnContralPanel.Controls.Add(table);
//pnoutputpanel.Controls.AddAt(0,outtable);
// }
//for (int i = 0; i < ar.Count; i=i+2)
//{
// //co (Control)ar[i];
// pnContralPanel.Controls.Add((Control)ar[i]);
// pnContralPanel.Controls.Add((Control)ar[i + 1]);
//}
//pnContralPanel.Controls.Add(table);
}
protected void btnAdd_Click(object sender, EventArgs e)
{
Control tdddddd=pnContralPanel.Controls[0];
if (Session["controlsArray"] != null)
{
table = (Table)Session["controlsArray"];
//pnContralPanel = (Panel)Session["controlsArray"];
}
//Session["isaddclicked"] = true;
String controltoadd = ddControlList.SelectedItem.Text;
Control obj = null;
Label lbl= new Label();
lbl.Text = txtCaption.Text;
if (controltoadd == "Text Box")
{
TextBox tb= new TextBox();
//tb.ID="txt"+txtCaption.Text;
tb.Text=txtValues.Text;
obj = tb;
}
else if (controltoadd == "Drop Down")
{
DropDownList dd = new DropDownList();
//dd.ID = "dd" + txtCaption.Text;
char[] ch={','};
String[] sepstring = txtValues.Text.Split(ch);
for (int i = 0; i < sepstring.Length; i++)
{
dd.Items.Add(sepstring[i]);
}
obj=dd;
}
else if (controltoadd == "Check Box")
{
CheckBox cb = new CheckBox();
//cb.ID = "cb" + txtCaption;
cb.Text = txtValues.Text;
obj = cb;
}
else
{
return;
}
TableRow tr=new TableRow();
tr.Cells.Add(new TableCell());
tr.Cells.Add(new TableCell());
tr.Cells[0].Controls.Add(lbl);
tr.Cells[1].Controls.Add(obj);
table.Rows.Add(tr);
Session["controlsArray"] = table;
table.ID = "abc";
pnContralPanel.Controls.Add(table);
//Session["controlsArray"] = pnContralPanel;
//pnContralPanel.Controls.AddAt(0, table);
ViewState["state"] = pnContralPanel;
}
protected void Button1_Click(object sender, EventArgs e)
{
// int idcdd=this.Controls.Count;
Session["isaddclicked"] = true;
// pnContralPanel = (Panel)ViewState["state"];
int c=pnContralPanel.Controls.Count;
//string s = pnContralPanel.Controls[0].GetType().ToString();
//cd = (Control)pnContralPanel.Controls[0];
Table t = (Table)pnContralPanel.Controls[0];
//Control tbcontrol = pnContralPanel.Controls[0];
//Table t = (Table)tbcontrol;
// table = (Table)pnContralPanel.Controls[0];
for (int i = 0; i < table.Rows.Count; i++)
{
TableRow toutr = new TableRow();
toutr.Cells.Add(new TableCell());
toutr.Cells.Add(new TableCell());
TableRow tr = t.Rows[i];
for (int j = 0; j < tr.Cells.Count; j++)
{
Control cn = tr.Cells[j].Controls[0];
Type tobj = cn.GetType();
switch (tobj.ToString())
{
case "System.Web.UI.WebControls.Label":
Label caption = (Label)cn;
Label ongoinglbl = new Label();
ongoinglbl.Text = caption.Text;
toutr.Cells[j].Controls.Add(ongoinglbl);
break;
case "System.Web.UI.WebControls.TextBox":
TextBox txt = (TextBox)cn;
Label value = new Label();
value.Text = txt.Text;
toutr.Cells[j].Controls.Add(value);
break;
case "System.Web.UI.WebControls.DropDownList":
DropDownList dd = (DropDownList)cn;
Label value1 = new Label();
value1.Text = dd.SelectedValue;
toutr.Cells[j].Controls.Add(value1);
break;
case "System.Web.UI.WebControls.CheckBox":
CheckBox cb = (CheckBox)cn;
Label value2 = new Label();
if (cb.Checked)
{
value2.Text = "yes";
}
else
{
value2.Text = "no";
}
toutr.Cells[j].Controls.Add(value2);
break;
}
}
outtable.Rows.Add(toutr);
}
pnoutputpanel.Controls.AddAt(0,outtable);
// Session["outTable"] = outtable;
}
}
|
|
|
|
|
I want to work my aspx pages from IIS undependantly.
How could i do?
I aim to create a demonstration CD.
it is a training Cd like CDs in MS Mocs.
i have list of subjects at left and slides at right.
|
|
|
|
|
You can't. The best you can do is to save the html files it generates, and then modify them so that all the links on them link directly to other html files you have created. No postback is going to occur, how successful this can be would depend entirely on how static your site is. If it has a forum, for example, forget it.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
How to free-memory(Dispose) for an specific object created an an instance of a class.
any suggestions
Thanks&Regards,
Priya.
|
|
|
|
|
is it is in C# then
objectname=null;
else (in VB)
objectname=nothing;
|
|
|
|
|
Thanks fr d same.
Thanks&Regards,
Priya.
|
|
|
|
|
Priya Cool wrote: How to free-memory(Dispose) for an specific object created an an instance of a class.
.NET manages the garbage collection automatically. You don't have to worry about clearing the objects. This will be done by .NET runtime automatically. But some classes implements IDisposable interface, which should be disposed by calling Dispose() method manually.
|
|
|
|
|
Hi to all
How can we obtain the IP address of the client in a http handler code from the context object? Or any other way ?
Thanks in advance
|
|
|
|
|
string ClientIp = Request.UserHostAddress;
We Can Do Anything, If We Want It
|
|
|
|
|
hi all
i have a gridview in a webpage, i set the datasource property of gridview to a datable so it will display the record available is the table now i have a delete button for each row in gridview but i cant able to do the code for delete button, the problem is how could i find the id for the record to which i click on delete button.
plz some body help me for the same
regards
Yogesh Agarwal
|
|
|
|
|
yogesh_kumar_agarwal wrote: but i cant able to do the code for delete button, the problem is how could i find the id for the record to which i click on delete button.
For this you need to keep one primary column on your datatable. When binding to gridview make this column to invisible. Eventhough it is invisible, you can access it by specifying the cell. So when delete button got click, you need to find out this hidden value. This will be the key for the record to be deleted.
|
|
|
|
|
Thanks for the reply but
I know these whole things, the problem is i am unable to got that id feild at runtime when i click on the delete button in perticular row.
regards
yogesh
|
|
|
|
|
use DataKey property of the gridview to access the ID value and to delete a particular record set the Command Property of the Delete Button as "Delete" and use GridView.RowCommand Event and put your delete code there...
Regards J O H N
"Even eagles need a push." David McNally
|
|
|
|