|
InsDev wrote: bmp.Save(Server.MapPath("filename", ImageFormat.Gif);
Not needed. This will create file on the server disk. You can pass the image URL to ASPX page which will work
|
|
|
|
|
What exception you got?
What about checking the "null" before binding??
e.g.
string[] rol;<br />
rol = Roles.GetRolesForUser(); <br />
<br />
if(roll != null){<br />
GridView1.DataSource = rol;<br />
GridView1.DataBind();<br />
}<br />
<br />
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Hi based on my query i am getting records like this:
Id Name PNo PName Link
1 Admin 134 Admin Form1..aspx
2 Gen.M 106 Maste frmPr.aspx
3 Hum.R 165 HR123 frmwo.aspx
4 Salar 201 HRsal frmsa.aspx
7 Cashe 126 Cashe frmCa.aspx
8 Chequ 159 Cheqy frmch.aspx
9 Bills 161 Cash1 frmca.aspx
I can able to bind the Name field properly in that tabtext(arraylist)...,
Similarly i try to bind the Pnames based on the Name field...,
Still that 4th id i can able to bind Names and its Pnames records properly..,
After that id 5th & 6th is not there so its binded 7th,8th,9th Names...,
But here that pnames are not binded based on that Name field...,
Its left that 7th & 8th id, PNames...,
After that its binded that 7th Id PNames In 9th Id...,
How to solve that?,
This is my code:
For Each dr As DataRow In dt.Rows
If Not _Text.Contains(dr("Name").ToString) Then
_Text.Add(dr("Name").ToString)
End If
Next
ts = CType(Me.FindControl("TabStrip1"), JQD.TabStrip)
ts.TabText = _Text 'Binded Names Properly Here No probs
'Binding Pnames on here Getting probs on the following code
Dim _SubTabText As Hashtable = New Hashtable
_Text = New ArrayList
For Each tabtextobj As Object In ts.TabText
Dim tabtext As String = tabtextobj.ToString()
Dim drs() As DataRow = dt.Select("Name='" + tabtext + "'")
Dim _SubText As ArrayList = New ArrayList
For Each dr As DataRow In drs
_SubText.Add(dr("Link")).ToString()
Next
_SubTabText.Add(drs(0)("Id") - 1, _SubText)
Next
ts.SubTabTextCol = _SubTabText
Plz Give Me Some Idea To Solve This One...,
-- modified at 1:31 Tuesday 13th November, 2007
Regards,
Mageshh
|
|
|
|
|
I am not able to understand ur problem properly. I dont have much idea but may be problem is in following code
For Each dr As DataRow In drs
_SubText.Add(dr("Link")).ToString()
Next
_SubTabText.Add(drs(0)("Id") - 1, _SubText)
Next
ts.SubTabTextCol = _SubTabText
Why you are using drs(0)("Id") I guses u shud use dr("Id").
Try it I guess it will work.
If doesnt then add if condition here too '''If Not _Text.Contains(dr("Name").ToString) Then'''
|
|
|
|
|
Hi all,
Can anybody plz help me how i can use Roles in Authorization section in Web.Config file while user authentication.
While user authentication, i want only specified logged in users can access some pages of my application.
Can i use Roles for this??
Plz help me.
Thanks,
Nagendra.
|
|
|
|
|
I used to use "Windows-authentication" in my network. I have the AD service to manage the user account..
So, we do the following things in our web project. The window authentication will take care the rest..
- Disable the anonymous access in our project.
- Use "Integrated-Windows Authentication"
If we don't want a particular user to view a particular page then we remove this user from this page.. It's very simple and powerful.. really nice to use for the intranet sites.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Hi all
i want a carousel control on my web page, its like a container where there are many images and two buttons left, right to scroll one by one image.
Can any one help me with this code.
Thanks and regards
Prakash Mishra(Banglore,India)
|
|
|
|
|
like that?? I suggest you to try the javascript library called Lightbox..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Hello Everyone,
I've designed a table and this table is placed inside the placeholder........
But now i want paging in this placeholder. Can anybody suggest me the way to solve it ..........
|
|
|
|
|
The Knowledge wrote: I've designed a table
A asp table don't have inbuilt paging. You can use DataGrid/GridView instead.
|
|
|
|
|
method to create database table for payshedule
|
|
|
|
|
gunaarun wrote: method to create database table for payshedule
What is payshedule?
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Hi all can anyone tell me how can we convert system date (of format like dd/mmm/yyyy or mm/dd/yyyy) into format for example '2007-10-25T11:47:10.515625+05:30' in c#.
Please response me soon.
I will very thankful for that..
Sincerly
Vishnu Narayan Mishra
|
|
|
|
|
|
DateTime.Now.ToString ("o");
Jon Sagara
Once again, the conservative sandwich-heavy portfolio pays off for the hungry investor! *slurp* Oh, I'm ruined!
-- Dr. Zoidberg
.NET Blog | Personal Blog | Articles
|
|
|
|
|
Thanks a lot sir Its working fine..
|
|
|
|
|
Hi,
we are retriving data from one database table to other database table. But we are getting error as invalid column. The issue is we are not using that column name in both table and even in .net code also. If we search the column name in full project code it is not finding that word also.
what will be the problem can any one help me
|
|
|
|
|
Well, if you're not naming the column anywhere in your code, where is it coming from ? Perhaps from something that's auto generated ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
The Column Name that you are retrieving(in the database) is different from your Column Name in the table.
God is always with you.
|
|
|
|
|
Which bit are you stuck on, ready XML ( google XPath ), or creating dynamic textboxes ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi guys
I found this example - where the files from a folder is listed within a Gridview. I have never seen this before - and to get it up running would really be usefull to many.
It runs fine on the localhost - but when it´s launched to a server it fails to list any files.
The error from the label is as:
The example is from: http://www.rekenwonder.com/aspnet/foldercontentsdatasource.html[^]
------------------------------------------------------------------
cs: WORKS FINE
------------------------------------------------------------------
protected void FolderContentsDataSource1_Selected(object sender, rw.FolderContentsDataSourceStatusEventArgs e)
{
if ((e.Exception != null))
{
lblError.Text = e.Exception.Message;
e.ExceptionHandled = true;
}
}
protected void gvFile_RowDeleted(object sender, System.Web.UI.WebControls.GridViewDeletedEventArgs e)
{
if ((e.Exception != null))
{
lblError.Text = e.Exception.Message;
e.ExceptionHandled = true;
}
}
protected void gvFile_RowUpdated(object sender, System.Web.UI.WebControls.GridViewUpdatedEventArgs e)
{
if ((e.Exception != null))
{
lblError.Text = e.Exception.Message;
e.ExceptionHandled = true;
}
}
------------------------------------------------------------------
ASP.NET *****Failure marked with stars*****
------------------------------------------------------------------
<asp:textbox id="tbFolder" runat="server" *******text="/Files" *******="" visible="false">
<asp:button id="btnShow" runat="server" text="Show contents" causesvalidation="false">
<asp:gridview id="GridView2" runat="server" datasourceid="FolderContentsDataSource1" autogeneratecolumns="False" allowpaging="True"
="" allowsorting="True" onrowdeleted="gvFile_RowDeleted" onrowupdated="gvFile_RowUpdated" backcolor="White" bordercolor="#999999" borderstyle="None" cellpadding="3" gridlines="Vertical" width="400px">
<headerstyle cssclass="headerstyle" backcolor="#000084" font-bold="True" forecolor="White">
<alternatingrowstyle cssclass="altstyle" backcolor="#DCDCDC">
<rowstyle cssclass="itemstyle" backcolor="#EEEEEE" forecolor="Black">
<columns>
<asp:boundfield datafield="Name" headertext="Filnavn" sortexpression="Name">
<asp:boundfield datafield="Size" headertext="Størrelse" sortexpression="Size" readonly="True">
<itemstyle horizontalalign="Right">
<asp:boundfield datafield="Created" headertext="Uploadet" sortexpression="Created"
="" readonly="True">
<asp:templatefield>
<itemtemplate>
<asp:linkbutton id="btnRename" runat="server" commandname="Edit" causesvalidation="false"
="" commandargument="<%# Container.DataItemIndex %>" text="Rename" tooltip="Skift filnavnet">
<asp:linkbutton id="btnDelete" runat="server" commandname="Delete" causesvalidation="false"
="" commandargument="<%# Container.DataItemIndex %>" text="delete" onclientclick="return confirm('Er du sikker på at du vil slette filen?');">
<edititemtemplate>
<asp:linkbutton id="btnUpdate" runat="server" commandname="Update" text="update"
="" commandargument="<%# Container.DataItemIndex %>">
<asp:linkbutton id="btnCancel" runat="server" commandname="Cancel" causesvalidation="false"
="" text="cancel">
<itemstyle horizontalalign="Center">
<footerstyle backcolor="#CCCCCC" forecolor="Black">
<selectedrowstyle backcolor="#008A8C" font-bold="True" forecolor="White">
<pagerstyle backcolor="#999999" forecolor="Black" horizontalalign="Center">
<cc1:foldercontentsdatasource id="FolderContentsDataSource1" runat="server" onselected="FolderContentsDataSource1_Selected">
<selectparameters>
<asp:controlparameter name="Directory" type="String" controlid="tbFolder" propertyname="Text">
<asp:label id="lblError" runat="server" enableviewstate="False" forecolor="Red">
|
|
|
|
|
You need to post the code again with "Ignore HTML tags in this message" checked.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
I have a data list show a image and a text the data is shown over laped.
The data show come from database it come from a select statment with a condition this query is in SQLDatasource
and the conection between the field and database is set visual. why the record come over laped?
merwa
|
|
|
|
|
Hi,
I have a requirement where I have a folder on local hard-drive containing many .pdf files.
Now I want to have a Hyperlink control point to this path of hard-drive folder and upon clicking on it the the pdf file should open in the browser.
The file path is say: C:/DocumentUpload/abc.pdf
I apply this to the url of hyperlink but it does not work. On mouse over the url shows:
file:///C:/DocumentUpload/abc.pdf
It will however work if i place the file in my web directory and just apply the filename "abc.pdf" to the url. Then the hyperlink on mouse over shows
http://localhost/mydomain/abc.pdf
How can I have my files in C:/DocumentUpload/ and still make it work using hyperlink. Or is there some other alternative. NOTE: I positively cannot place the files in web directory folder.!!
Any help is eagerly awaited!
Pankaj Chamria,
Software Programmer.
|
|
|
|
|
Pankaj C wrote: NOTE: I positively cannot place the files in web directory folder.!!
- Use IE
- Add your website in the trust site.
then, I think it will work.. but it's not good practice for public site.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|