|
You can use the System.DirectoryServices namespace, here is an example[^].
|
|
|
|
|
Dear Friend..
I need to create a virtual directory for my application.If i do it,its asking for the alias name.After giving the alias name,its saying that the name already exists.But that alias name doesn't exist in my IIS before.What could be the problem..? I am getting the following message when i try to give the alias name.
"The alias LM/W3SVC/1/Root/iCashCard already exists.Please choose a different alias."
Why does this occur.? Someone help in this regard as early as possible..
Regards,
Balaguru
|
|
|
|
|
Balagurunathan S wrote: "The alias LM/W3SVC/1/Root/iCashCard already exists.Please choose a different alias."
This[^] would help you
|
|
|
|
|
Hi,
I have a Main.aspx. I put a Grid control on it. Main page having links of other page. I am sending some value from other page to Main page and adding into Grid. Again I am navigating to other page and sending some more data to Main page to add in Grid.When it load Main page second time, grid becomes empty.
You can visualize my Requirment as: I am selecting products from different page and putting it over Main page.
Hope my techie friends understood my requirement.
Thanks a lot in advance !
|
|
|
|
|
AFAIK, you are not keeping the grid values anywhere. You can keep the data source of grid view in session and update it when new links are added. Load the data source from session and bind gridview.
|
|
|
|
|
and also check the postback property too......
manoj Kumar Jha
"Learn to smile at every situation. See it as an opportunity to prove your strength and ability."
|
|
|
|
|
Hi All,
I want to add a table to my form and also I need to enter data throught text box (s) into tablecells whenever iI press add button using ASP.Net(Vb.net) at dynamically. Every time I need to add 3-cells in everyrow whenever I hit Add button. Please help me how to overcome this situation.
Please guide me.
Thanks in Adv. to everyone.
kolags@hotmail.com
|
|
|
|
|
You can use Table class. Add the Table instance to a content placeholder.
|
|
|
|
|
Hi Navaneeth,
Thanks for soon response . Could you please give me some more specifically?
Hope you could understand my requirement. I have a calendar controls, below that 2- text boxes and one Add & cancel buttons are available. Whenever user selected a date from calendar, the selected date will be placed into textbox1 and manually user has to enter data in textbox2 (like some one’s b’day), if hits add, immediately the corresponding data (textboxes) has to be adding into two separate cells in each row of a table.
Now I am able to add data, but only one selected item, means whenever I selected any other date from calendar controls that time table is disappearing, after select and added, automatically first one is overriding.
Expecting some code snippet.
Don't take any decisions when you are Angry,
Don't make any promises when you are Happy.
|
|
|
|
|
Why you are using Table here ? Is it just for displaying in tabular form, or any other reasons ? If it is only for displaying tabularly, you can use DataGrid/GridView . When user enters data in to the textbox, fetch that and create a DataTable . Bind this datatable with DataGrid/GridView. Store datatable in Session/ViewState for future use. When user clicks the textbox again, check DataTable existance in Session/ViewState. Cast it and add new rows and re-bind grid. This will be easy solution than using tables,
|
|
|
|
|
Hi Navaneeth,
Thank you very much. I have completed my task with your suggestion by using datagrid.
kolags@hotmail.com
Don't take any decisions when you are Angry,
Don't make any promises when you are Happy.
|
|
|
|
|
Glad to know that it helped.
|
|
|
|
|
hi all
i want to access the master page control in a webpage.
how can i access .
using c#,asp.net
rajeev kumar sharma
vri software pvt. ltd.
new delhi India
|
|
|
|
|
RajeevKumarSharma wrote: i want to access the master page control in a webpage.
Page has a Master property which gives access to master page used.
|
|
|
|
|
thanks
rajeev kumar sharma
vri software pvt. ltd.
new delhi India
|
|
|
|
|
i want to programmatically access the data from outlook.
Actually i want to create a report which will provide the epmloyees
according to Reporting manager.
Do i need to exchange server or Outlook ?
|
|
|
|
|
How to create Crystal Report using Asp.Net2.0 Could you please explain me step by step or any suggession and link will be helpfull.
Thanks in Advance...
Erasers are for people who are willing to correct their mistakes.
|
|
|
|
|
Is google[^] broken where you live ?
|
|
|
|
|
Hello,
I am trying to implement the data list delete feature with a linkbutton.
I have different users who login and can view a message posts. I want to give the ability to delete a message only to the one who posted it. So I am trying to loop through the datalist and check if the logged in user has a posted message show the delete link button otherwise don't show the delete button.
I declared a session for the logged in user Session["UserID"] and I am trying to retrieve the userId from the table like this:
<asp:datalist datakeyfield="ChalkboardID" ondeletecommand="DataList1_DeleteCommand" id="DataList1" repeatlayout="table" runat="server" datasourceid="ChalkDL">
<itemtemplate>
<![CDATA[<%
System.Data.DataView dv = ((System.Data.DataView)(ChalkBTable.Select(DataSourceSelectArguments.Empty)));
noMsgLbl.Text = Session["UserID"].ToString();
foreach (System.Data.DataRowView drv in dv)
{
if (drv.Row["UserID"].Equals(Session["UserID"]))
{ %>]]>
<td style="padding-top: 10px;"><asp:linkbutton visible="true" runat="server" commandname="delete" id="deleteBtn" text="Delete"></asp:linkbutton></td>
}
else
{ %>
<td style="padding-top: 10px;"><asp:linkbutton visible="false" runat="server" commandname="delete" id="LinkButton1" text="Delete"></asp:linkbutton></td>
}
}
%>
</itemtemplate></asp:datalist>
It works correct if there is only one post. Meaning the user who posted the message can delete it and others can't because the delete button is not visible.
But once I add another record it gets messed up. Does anybody see the problem or has another solution for this?
Thank you.
<div class="ForumMod">modified on Sunday, January 06, 2008 6:23:08 PM</div>
|
|
|
|
|
I guess DataList provides a FindControl() method which you can use for finding hyper link and changing visibility instead of mixing markup and server side coding at one place. If you do so, you would be able to step into the code and findo ut which is making problem.
|
|
|
|
|
Thank you for the response.
I can use the step into in the html as well. When you use <% %> it lets create break points, which I did.
The problem is that it loops through the same record and doesn't go further than the first record. I don't know why.
|
|
|
|
|
It seems that the "normal" method for using the FileUpload (or HTML file) control is for the user to choose the file with the upload control, then provide another button (or link or something else) to process that file. So, the user chooses the file, then clicks the other control to update or save the file. I would like to make this a one step process where the file is processed as soon as the user chooses the file. The nicest solution would have been handling a FileUpload control event that indicated when the user had chosen the file and it was uploaded, but there doesn't appear to be any such event.
With help from a CodeProject article, I wrote some javascript to trigger the file upload. The javascript is called in the Click event handler of another button. After the user chooses the file, it continues to the handler to do what I wanted (save to database and update screen). See the code below:
function getFile()<br />
{<br />
var uploadCtrl = document.getElementById("File1");<br />
<br />
uploadCtrl.click();<br />
}<br />
<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
Button1.Attributes.Add("OnClick", "return getFile();");<br />
}<br />
<br />
protected void Button1_Click(object sender, EventArgs e)<br />
{<br />
if (File1.PostedFile != null)<br />
{<br />
}<br />
}
It only gets to Button1_Click after the upload if I remove 'runat="server"' from the HTML file control definition. The problem is that I need 'runat' to get access to PostedFile etc.
Does anyone have any suggestions? If you can fix the above method, I would be very happy. If you have a better way of solving my problem, then I am still happy. If you can educate me on why the above method does what it does, I am always happy to learn.
Thanks,
Dave
|
|
|
|
|
im trying to pass arabic text in my query string.........
but the data appears rabish.......
i rtied to past the result URL and QuerString and worked well.....
so i think the Creat() method ...so plz i need help and this is the method i use....
HttpWebRequest Requset = (HttpWebRequest)HttpWebRequest.Create(URL + "&depositType=" + System.Web.HttpUtility.UrlEncode("Some Arabic Text") + "&transferName=" + System.Web.HttpUtility.UrlEncode("Some Arabic Text"));
Requset.Method = "GET";
HttpWebResponse Response = (System.Net.HttpWebResponse)Requset.GetResponse();
|
|
|
|
|
I want to know how can I save logo(jpge) pic
on jpge pic.
by code...
I want big pic and logo down on the pic.
that will be together.
when I save on web the photo the 2 pic will be 1.
|
|
|
|
|
You can't do anything with the JPEG files directly, you have to load the images into Bitmap objects to work with them.
Use the Graphics.FromImage to create a Graphics object that you can use to draw on the image. Use the DrawImage method to draw the logo onto the image.
If you are uploading the image in a web page, you can load the image directly from the upload stream into a Bitmap object using the Image.FromStream method.
Experience is the sum of all the mistakes you have done.
|
|
|
|