|
Hi,
I dont work with vb.net I added this code in the file Default.aspx.vb
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load<br />
fldRoles.Text = String.Format("User {0} has in the following roles:", My.User.Name)<br />
For Each arole As String In Roles.GetRolesForUser(My.User.Name)<br />
fldRoles.Text += String.Format("<br/>{0}", arole)<br />
Next<br />
If My.User.IsInRole("AdminModule1") Then<br />
Response.Redirect("adminM1/nn.aspx")<br />
Response.End()<br />
ElseIf My.User.IsInRole("AdminModule2") Then<br />
Response.Redirect("adminM2/nn.aspx")<br />
Response.End()<br />
ElseIf My.User.IsInRole("AdminModule3") Then<br />
Response.Redirect("adminM3/nn.aspx")<br />
Response.End()<br />
<br />
End If<br />
End Sub but no result
Thanks
|
|
|
|
|
Hi To All,
Please help me to solve my problem.
I am developing a web application. In that I need To Scan Document Through Scanner. I am not getting how i should implement, What resources I should use to get the device. I also want to set the path through code and after scanning the image, It should be displayed on My webPage.
Please Help Me. And I will be glad if you Reply with Sample Code.
Thanks & Regards
Sanket Patil
.
|
|
|
|
|
Hi,
I use a package from "VintaSoft Twain.NET SDK" for scanning. Really easy to use and implemented. I am new to C# dev and I managed to build a scanning app in a day or two. They inlcude a sample application to get you started. (http://www.vintasoft.com/[^])
Cheers
Q
|
|
|
|
|
Hi,
I have a webform with many controls. On click of a button a jquery modal window populates with the details of say products of an organisation. in the popup these results are being rendered thru a webservice and bound to a gridview. on selecting any one product I want to transfer all the details back to main form and close the modal. Also if user doesn't want any of the products, user should just close and come back to main page.
Till now I have been able to get a jquery modal in button click and have loaded the other aspx form in the modal dialog. I am able to pass hardcoded values but unable to pass selected parameters !! Also I cannot return the values back from the aspx loaded in modal back to parent form.
<pre>
$(
function(){
/* Modal Dialog Box Configuration */
$(
"#addproductsForm").dialog({
autoOpen:
false,
modal:
true,
overlay: {
"background-color": "#000",
"opacity": "0.5",
"-moz-opacity": "0.5"
}
});
$(
"#btnAddSession").click(function(event){
$(
"#addproductsForm").dialog("open");
//event.preventDefault();
return false;
});
});
<
div id="addproductsForm" title="Dialog Title" >
<
iframe src = "WebForm4.aspx?id='jack'&id2='jill'" width="480"></iframe>
</
div>
</pre>
How do i trap the click event of the gridview checkbox select to send the vales back to the parent window and also close the modal
|
|
|
|
|
problem solved already...
suchita
modified on Monday, January 31, 2011 10:39 AM
|
|
|
|
|
I want to check event when textBox get focus.
i search internet and find out a way which use javascript.
Blow address is which i found out.
http://ryanfarley.com/blog/archive/2004/12/21/1325.aspx
but i want to control in server control.
Is it possible?
Have a nice Day.
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
Use the JavaScript way and fire a PostBack from the client-side.
|
|
|
|
|
Hi,
I'm using at my application a serval sessions.
For ex:
Session["StartTime"]
Session["EndTime"]
Session["UserName"]
and i'm trying to give them a time out
I tried to add to the web.config:
<SessionState TimeOut="60"/></
But it dosen't work.
How i can give each session a time out?
Can someone please help me?
|
|
|
|
|
You are somewhat confused about what Session is. Session is one single object. You do not have three Sessions, you have three Session variables.
ASP.NET Session State Overview[^]
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
error web service hexadecimal value 0x0E, is an invalid character.
what is soluation for this problem?
Regards,
Rami Sa'id Abdalhalim
Technical Team Leader
Amman Commercial Complex
Ommayah Str. Al-Abdali
Tel: +962 6 5696500 Ext.235
Mobile:+962 79 5366016
Email:r.abdalhalim@alghanem.com.jo
www.alghanemgroup.com
|
|
|
|
|
hi,
please check whether Webservice has any error. If not, check the response you are receiving from web service contains any invalid char to xml(like '&'). hope it would shed some light on your problem.
|
|
|
|
|
Error Webservice (hexadecimal value 0x0E, is an invalid character)
how can solve this problem?
Regards,
Rami Sa'id Abdalhalim
Technical Team Leader
Amman Commercial Complex
Ommayah Str. Al-Abdali
Tel: +962 6 5696500 Ext.235
Mobile:+962 79 5366016
Email:r.abdalhalim@alghanem.com.jo
www.alghanemgroup.com
|
|
|
|
|
1) Remove the duplicate posting.
2) We need more details.
3) Google.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
By providing more information.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
Trolls[ ^]
|
|
|
|
|
How to put logo(jpeg image) in crystal reports in vb .net?Hope ur help.
|
|
|
|
|
|
hi,
follow below steps..
1. create one typed dataset with binary (blob) column or add new column of blob if you are already using the typed dataset.
2. convert your image into binary object
3. load it in that column and bind it in your rpt of crystal report.
Hope this helps..
|
|
|
|
|
Is there any drawback to keeping all your SQL in the asp code rather than using stored procedures (SQL Server) ?
Here's where I'm coming from: I inherited a database and initially had network and compatability issues connecting right to the database. So, I created a hack-job Access database to view the tables, but I still couldn't manipulate the stored procedures. To get around this, I just wrote the SELECT/UPDATE/ALTER statements right into the asp. Now, I'm thinking its so much easier that way, but wonder if that's bad form.
Thoughts?
----------------------------------
I'm not a programmer by trade, so please don't beat me unmerciful.
|
|
|
|
|
Wow that's a hot potato you got there ... For every response that you get that says "put it in a store procedure" you will get "put it in your application code".
The way I'm developing applications is to create classes which abstract the database details from my application. The ASP.NET application doesn't know if I'm storing the data in XML, MS-Access, MS-SQL or Oracle.
When you have some time, research "Building a Data Access Layer" and you will see what I'm getting at.
Good luck.
|
|
|
|
|
Hi All,
I am developing an MVC web application and one of the pages allows for an attachment to be uploaded. Once uploaded, it is saved in a database field as binary data. Any attachments are then shown on a page as links.
When a user clicks a link it directs to an Action that returns a FileContentResult. In general the process is working but it is not quite what I want. Basically, what I want to achieve is as follows...
1. If the user clicks the link, the browser will attempt to open the file, if it cannot open then it prompts for save as...
2. The user can right-click and select "Save Link As.." (or whatever you browser calls it) and can download the file. The requirement here is to provide a default file name based on the file name of the attachment
...I can get both working but not together. This is two "simplified" variations of my function (found in a controller) which produce the two results...
1. Click link opens, right click prompts (but default file name is chosen by browser = "download.pdf")
public ActionResult DownloadFile()
{
return File(fileByteArray, fileContentType);
}
2. Click link prompts, right click prompts (default file name is correctly set)
public ActionResult DownloadFile()
{
return File(fileByteArray, fileContentType, "filename.pdf");
}
...So it seems that by using the overload which allows to specify the file name, I am sacrificing the ability to open the file in the browser. But I want both!
Any ideas?
Thanks
return 5;
|
|
|
|
|
To force the download of a PDF file, instead of being handled by the Browser PDF plugin:
public ActionResult DownloadPDF()
{
return File("~/Content/MyFile.pdf", "application/pdf", "MyRenamedFile.pdf");
}
If you want to let the browser handle by its default behavior (plugin or download), just send two parameters.
public ActionResult DownloadPDF()
{
return File("~/Content/MyFile.pdf", "application/pdf");
}
Read here[^] for more info
"If your actions inspire others to dream more, learn more, do more and become more, you are a leader." - John Quincy Adams
|
|
|
|
|
That's pretty much what I already said. Are you saying what I want can't be done?
return 5;
|
|
|
|
|
hi,
On opening the pop up window the parent has to be closed. when im using the following code:
window.opener=null;
window.opener.close();
in the pop up window..im getting an alert box like "the page you are viewing is about to close"..
i have to stop that alert box..
any suggestions please.
thanking you,
with regards,
vishnu.
|
|
|
|
|
You can't get rid of it. It's a browser feature and the trick you're using hasn't worked since IE6.
|
|
|
|
|
So you want to pop up one window and close the window which opened it? Surely that can be achieved by just navigating to the new page? (miraculously the old window page will be gone!)
return 5;
|
|
|
|